THERE is a growing consensus that the emergence of quasars at high red
shifts is related to the onset of galaxy formation(1), suggesting that
the detection of concentrations of gas accompanying such quasars shou
ld provide flues about the early history of galaxies. Quasar companion
s have been recently identified at redshifts up to z approximate to 3
(refs 2-4). Here we report observations of Lyman-alpha emission (a tra
cer of ionized hydrogen) from the companion to a quasar at z = 4.7, co
rresponding to a time when the Universe was less than ten per cent of
its present age. We argue that most of the emission arises in a gaseou
s nebula that has been photoionized by the quasar, but an additional c
omponent of continuum light-perhaps quasar light scattered from dust i
n the companion body, or emission from young stars within the nebula-a
ppears necessary to explain the observations. These observations may b
e indicative of the first stages in the assembly of galaxy-sized struc
tures.