  During the runaway phase of their formation, gas giants fill their
gravitational spheres of influence out to Bondi or Hill radii. When runaway
ends, planets shrink several orders of magnitude in radius until they are
comparable in size to present-day Jupiter; in 1D models, the contraction occurs
on the Kelvin-Helmholtz time-scale $t_{\rm KH}$, which is initially a few
thousand years. However, if angular momentum is conserved, contraction cannot
complete, as planets are inevitably spun up to their breakup periods $P_{\rm
break}$. We consider how a circumplanetary disc (CPD) can de-spin a
primordially magnetized gas giant and remove the centrifugal barrier, provided
the disc is hot enough to couple to the magnetic field, a condition that is
easier to satisfy at later times. By inferring the planet's magnetic field from
its convective cooling luminosity, we show that magnetic spin-down times are
shorter than contraction times throughout post-runaway contraction: $t_{\rm
mag}/t_{\rm KH}\sim(P_{\rm break}/t_{\rm KH})^{1/21}\lesssim 1$. Planets can
spin down until they corotate with the CPD's magnetospheric truncation radius,
at a period $P_{\rm max}/P_{\rm break} \sim (t_{\rm KH}/P_{\rm break})^{1/7}$.
By the time the disc disperses, $P_{\rm max}/P_{\rm break}\sim 20-30$; further
contraction at fixed angular momentum can spin planets back up to $\sim$$10
P_{\rm break}$, potentially explaining observed rotation periods of giant
planets and brown dwarfs.
