  We consider a geometric property of the closest-points projection to a
geodesic in Teichm\"uller space: the projection is called contracting if
arbitrarily large balls away from the geodesic project to sets of bounded
diameter. (This property always holds in negatively curved spaces.) It is shown
here to hold if and only if the geodesic is precompact, i.e. its image in the
moduli space is contained in a compact set. Some applications are given, e.g.
to stability properties of certain quasi-geodesics in Teichm\"uller space, and
to estimates of translation distance for pseudo-Anosov maps.
