We show that, providing a metric space X has a boundary that is in som
e sense similar to the boundary of hyperbolic space, the iterates of a
contraction f : X --> X converge locally uniformly to a point in, or
on the boundary of, X. This generalises the Denjoy-Wolff theorem for a
nalytic self-maps of the unit disc in the complex plane, and also show
s that if D is a bounded strictly convex subdomain of R-n, then any co
ntraction of D with respect to the Hilbert metric of D converges to a
point in the closure of D.