In order to investigate the effects of a hard ultraviolet (uVX) photon field on the formation of large disc galaxies, we have performed 3D hydrodynamic and N-body simulations of the formation of a Milky Way-sized galaxy. We use a TREE-SPH code to follow the collapse of an overdense region with 95 per cent collisionless dark matter and 5 per cent baryonic gas. The principal effect of the UVX flux is to ionize the gas, significantly reducing its ability to dissipate energy by line-cooling mechanisms. We present the results of two simulations starting from the same initial conditions: one of the simulations includes the presence of a uVX radiation field while the other does not. Based on the results of these and other simulations, we conclude that a background uVX radiation field can significantly affect not only the formation of small galaxies, as proposed by Efstathiou, but also the global properties of large disc galaxies. Key words: hydrodynamics - galaxies: evolution - galaxies: formation - diffuse radiation.