Periodic ab initio density functional calculations on ultrathin films of AlN, BeO, GaN, SiC, ZnO, and ZnS demonstrate the stabilization of thicker films terminating with the polar {0001} surface via charge transfer and metallization of the surface layers. In contrast thinner films remove the dipole by adopting a graphiticlike structure in which the atoms are threefold coordinate. This structure is thermodynamically the most favorable for these thinner films. Implications for the crystal growth of wurtzite materials are discussed.