We present 3D smoothed particle hydrodynamics simulations of the collapse of clumps formed through gravitational instability in the outer part of a protoplanetary disc. The initial conditions are taken directly from a global disc simulation, and a realistic equation of state is used to follow the clumps as they contract over several orders of magnitude in density, approaching the molecular hydrogen dissociation stage. The effects of clump rotation, asymmetries and radiative cooling are studied. Rotation provides support against fast collapse, but non-axisymmetric modes develop and efficiently transport angular momentum outwards, forming a circumplanetary disc. This transport helps the clump reach the dynamical collapse phase, resulting from molecular hydrogen dissociation, on a thousand-year time-scale, which is smaller than time-scales predicted by some previous spherical 1D collapse models. Extrapolation to the threshold of the runaway hydrogen dissociation indicates that the collapse time-scales can be shorter than inward migration time-scales, suggesting that clumps could survive tidal disruption and deliver a protogas giant to distances of even a few au from the central star.