Abstract We investigate ergodic properties of geodesic flows on compact Riemannian manifolds. A general criterion for local instability is formulated in terms of the averaged geodesic deviation equation. The negativity of the Ricci scalar provides a sufficient condition for local instability of a geodesic flow. This condition supplemented with compactness of the manifold leads to the so-called Anosov property of the geodesic flow. The effectiveness of our criterion is demonstrated in the case of multidimensional cosmological models. The chaotic behaviour of geodesics in spacetime is also discussed.