  In the majority of magnetic systems the surface is required to order at the
same temperature as the bulk. In the present study, we report a distinct and
unexpected surface magnetic phase transition, uniquely at a lower temperature
than the N\'eel temperature. Employing grazing incidence X-ray resonant
magnetic scattering we have observed the near surface behavior of uranium
dioxide. UO$_2$ is a non-collinear, triple-q, antiferromagnet with the U ions
on an face-centered-cubic lattice. Theoretical investigations establish that at
the surface the energy increase, due to the lost bonds, reduces when the spins
near the surface rotate, gradually losing their normal to the surface
component. 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.
