  We investigate the relationship between the quenching of star formation and
the structural transformation of massive galaxies, using a large sample of
photometrically-selected post-starburst galaxies in the UKIDSS UDS field. We
find that post-starburst galaxies at high-redshift ($z>1$) show high S\'ersic
indices, significantly higher than those of active star-forming galaxies, but
with a distribution that is indistinguishable from the old quiescent
population. We conclude that the morphological transformation occurs before (or
during) the quenching of star formation. Recently quenched galaxies are also
the most compact; we find evidence that massive post-starburst galaxies
(M$_{\ast}> 10^{10.5} ~$M$_{\odot}$) at high redshift ($z>1$) are on average
smaller than comparable quiescent galaxies at the same epoch. Our findings are
consistent with a scenario in which massive passive galaxies are formed from
three distinct phases: (1) gas-rich dissipative collapse to very high
densities, forming the proto-spheroid; (2) rapid quenching of star formation,
to create the "red nugget" with post-starburst features; (3) a gradual growth
in size as the population ages, perhaps as a result of minor mergers.
