The extension of the Aubry--Mather theory to Hamiltonian systems of dimension higher than 4 remains an open problem. The invariant Mather sets correspond to global minimizers of the action integral, and therefore it seems natural to attempt to look for the higher dimensional analogues of Mather sets as global minimizers. An example of Hedlund shows that such an attempt breaks down: a global minimizer may fail to exist. To be more precise, Hedlund constructed a metric on ${\bf T}^3$ for which there is no globally minimizing geodesic (on the covering space) with the rotation vector not along one of the coordinate axes.
Despite this counterexample, however, it may still be possible that any rotation vector is represented by a {\it local} minimizer, i.e. by an orbit whose action is minimal among its neithgbors.
We show that, indeed, any rotation vector on the torus is represented by a locally minimizing geodesic, for a class of Riemannian metrics of the type considered by Hedlund, so that the Aubry--Mather theory does extend in this particular case.
This result has several implications -- for instance, closed geodesics of a certain type are hyperbolic; any pair of such geodesics is heteroclinically connected; any average action from an interval of values is realized by a geodesic, etc.