  We settle a problem of Havel by showing that there exists an absolute
constant d such that if G is a planar graph in which every two distinct
triangles are at distance at least d, then G is 3-colorable. In fact, we prove
a more general theorem. Let G be a planar graph, and let H be a set of
connected subgraphs of G, each of bounded size, such that every two distinct
members of H are at least a specified distance apart and all triangles of G are
contained in \bigcup{H}. We give a sufficient condition for the existence of a
3-coloring phi of G such that for every B\in H, the restriction of phi to B is
constrained in a specified way.
