Context. The seeds of the supermassive black holes with masses of ∼10 9 M observed already at z ∼ 6 may have formed through the direct collapse of primordial gas in T vir 10 4 K halos, whereby the gas must stay hot (∼10 4 K) in order to avoid fragmentation. Aims. The interplay between magnetic fields, turbulence, and a UV radiation background during the gravitational collapse of primordial gas in a halo is explored; in particular, the possibilities for avoiding fragmentation are examined. Methods. Using an analytical one-zone model, the evolution of a cloud of primordial gas is followed from its initial cosmic expansion through turnaround, virialization, and collapse up to a density of 10 7 cm −3 . Results. It was found that in halos with no significant turbulence, the critical UV background intensity (J crit 21 ) for keeping the gas hot is lower by a factor ∼10 for an initial comoving magnetic field B 0 ∼ 2 nG than for the zero-field case, and even lower for stronger fields. In turbulent halos, J crit 21 is found to be a factor ∼10 lower than for the zero-field-zero-turbulence case, and the stronger the turbulence (more massive halo and/or stronger turbulent heating), the lower J crit 21 . Conclusions. The reduction in J crit 21 is particularly important, since it exponentially increases the number of halos exposed to a supercritical radiation background.