The origin of the cosmic X-ray background radiation has remained mysterious since its discovery thirty-five years ago. Investigation of its origin has been difficult because instruments have had insufficient resolution to distinguish small, faint sources in the hard X-ray band (above 2 keV) that dominates the background. Until now, only three per cent of the flux in the 2-10 keV band could be attributed to individual sources. Here we report the results of a survey 100 times more sensitive than previous studies in the 2-10 keV band. We find many faint resolved sources, whose integrated flux accounts for 30 per cent of the X-ray background in this energy range. The average spectrum of the resolved sources is harder than those of nearby bright active galactic nuclei and is close to the spectrum of the X-ray background radiation. This means that a new class of sources, with hard X- ray spectra, dominate the sky at photon energies above 2 keV.