In the majority of magnetic systems the surface is required to order at the same temperature as the bulk. In the present Letter, we report a distinct and unexpected surface magnetic phase transition at a lower temperature than the Néel temperature. Employing grazing incidence x-ray resonant magnetic scattering, we have observed the near-surface behavior of uranium dioxide. UO2 is a noncollinear, triple-q, antiferromagnet with the U ions on a face-centered cubic lattice. Theoretical investigations establish that at the surface the energy increase-due to the lost bonds-is reduced when the spins near the surface rotate, gradually losing their component normal to the surface. At the surface the lowest-energy spin configuration has a double-q (planar) structure. With increasing temperature, thermal fluctuations saturate the in-plane crystal field anisotropy at the surface, leading to soft excitations that have ferromagnetic XY character and are decoupled from the bulk. The structure factor of a finite two-dimensional XY model fits the experimental data well for several orders of magnitude of the scattered intensity. Our results support a distinct magnetic transition at the surface in the Kosterlitz-Thouless universality class.