The Hubble Deep Field (HDF) is a region in the sky that provides one of the deepest multi-wavelength views of the distant universe and has led to the detection of thousands of galaxies seen throughout cosmic time 1 . An early map of the HDF at a wavelength of 850 microns that is sensitive to dust emission powered by star formation revealed the brightest source in the field, dubbed HDF850.1 2 . For more than a decade, this source remained elusive and, despite significant efforts, no counterpart at shorter wavelengths, and thus no redshift, size or mass, could be identified 3-7 . Here we report, using a millimeter wave molecular line scan, an unambiguous redshift determination for HDF850.1 of z=5.183. This places HDF850.1 in a galaxy overdensity at z~5.2 in the HDF, corresponding to a cosmic age of only 1.1 Gyr after the Big Bang. This redshift is significantly higher than earlier estimates 3,4,6,8 and higher than most of the >100 sub-millimeter bright galaxies identified to date. The source has a star formation rate of 850 M sun yr -1 and is spatially resolved on scales of 5 kpc, with an implied dynamical mass of ~1.3x10 11 M sun , a significant fraction of which is present in the form of molecular gas. Despite our accurate redshift and position, a counterpart arising from starlight remains elusive.We have obtained a full frequency scan of the 3 mm band towards the HDF using the IRAM Plateau de Bure Interferometer (PdBI). The observations covered the frequency range from 80-115 GHz in 10 frequency settings at uniform sensitivity and at a resolution (~2.3") that is a good match to galaxy sizes at high redshift. They resulted in the detection of two lines of Carbon Monoxide (CO), the most common tracer for molecular gas at high redshift 9 , at 93.20 GHz and 111.84 GHz at the position of HDF850.1. Identifying these lines with the J=5 and J=6 rotational transitions of CO gives a redshift for HDF850.1 of z=5.183. This redshift was then unambiguously confirmed by the PdBI detection of the 158 μm line of ionized carbon ([CII], redshifted to 307.38 GHz), one of the main cooling lines of the star-forming interstellar medium. Stacking of other molecules covered by our frequency scan that trace higher volume densities did not lead to a detection (see Supplementary Information). Subsequently, the J=2 line of CO has also been detected using the NRAO Jansky Very Large Array (Jansky VLA) at 37.29 GHz. The observed [CII] and CO spectra towards HDF850.1 are shown in Fig. 1.The beamsize of our CO observations (~2.3", 15 kpc at z=5.183) is too large to spatially resolve the molecular gas emission in HDF850.1. However the [CII] and underlying continuum observations (~1.2" x 0.8") show that the source is extended (hitherto, the interstellar medium has been spatially resolved only in extremely rare quasar host galaxies at such high redshift 10 ). A single Gaussian fit yields a deconvolved size of 0.9±0.3", or 5.7±1.9 kpc at the redshift of the source. Fig. 2 shows the maps of total [CII] emission (left) as well as the red-and blue-...