The history of the transition from a neutral intergalactic medium (IGM) to one that is almost fully ionized can reveal the character of cosmological ionizing sources. We study the evolution of the volume filling factors of H II and He III regions in a clumpy IGM and discuss the implications for rival reionization scenarios of the rapid decline observed at z greater than or similar to 3 in the space density of optical and radio-loud quasars and of the large population of star-forming galaxies recently discovered at the same epoch. The hydrogen component in a highly inhomogeneous universe is completely reionized when the number of photons emitted above 1 ryd in one recombination time equals the mean number of hydrogen atoms. If stellar sources are responsible for keeping the IGM ionized at z = 5, the rate of star formation at this epoch must be comparable or greater than the one inferred from optical observations of galaxies at z approximate to 3 and the mean metallicity per baryon in the universe greater than or similar to 0.002 solar. An early generation of stars in dark matter halos with circular velocities, v(circ) approximate to 50 km s(-1), possibly one of the main sources of UV photons at high z, could be detectable with the Next Generation Space Telescope. Models in which the quasar emissivity declines rapidly at z greater than or similar to 3 predict a late He II reionization epoch, a feature that could explain the recent detection of patchy He II Ly alpha at z = 2.9 by Reimers et al. and the abrupt change observed by Songaila at about the same epoch of the Si Iv /C Iv ratio, but appear unable to provide the required number of hydrogen-ionizing photons at z approximate to 5.