A class of Bianchi IX cosmological models is shown to have chaotic gravitational collapse, due to Poincaré's homoclinic phenomena. We can program such models so that for any given positive integer N ( N=∞ included) the universe undergoes N non-periodic oscillations (each oscillation requiring a long time) before collapsing. For N=∞ the universe undergoes periodic oscillations.