We consider the three-dimensional viscous primitive equations with periodic boundary conditions. These equations arise in the study of ocean dynamics and generate a dynamical system in a Sobolev H1-type space. Our main result establishes the so-called squeezing property in the Ladyzhenskaya form for this system. As a consequence of this property we prove the finiteness of the fractal dimension of the corresponding global attractor, the existence of a finite number of determining modes and the ergodicity of a related random kick model. All these results provide new information concerning the long-time dynamics of oceanic motion.