We analyse very deep X-ray and mid-IR surveys in common areas of the Lockman Hole and the HDF North to study the sources of the X-ray background ( XRB ) and to test the standard obscured accretion paradigm . Observations with XMM-Newton and ISO of a substantial area in Lockman are particularly important to sample luminous - but relatively uncommon - obscured AGNs . We detect a rich population of X-ray luminous sources with red optical colours , including a fraction identified with Extremely Red Objects ( R-K > 5 ) and galaxies with SEDs typical of normal massive ellipticals or spirals at z \sim 1 . The X-ray luminosities of these objects ( L _ { 0.5 - 10 { keV } } \sim 10 ^ { 43 } -10 ^ { 45 } erg/s ) indicate that the ultimate energy source is gravitational accretion , while the X-ray to IR flux ratios and the X-ray spectral hardness show evidence of photoelectric absorption at low X-ray energies . An important hint on the physics comes from the mid-IR data at 6.7 and 15 \mu m , well reproduced by model spectra of completely obscured quasars under standard assumptions and line-of-sight optical depths \tau _ { 0.3 \mu } \simeq 30 - 40 . Other predictions of the standard XRB picture , like the distributions of intrinsic bolometric luminosities and the relative fractions of type-I and -II objects ( 1:3 ) , are also consistent with our results . Obscured gravitational accretion is then confirmed as being responsible for the bulk of the X-ray background , since we detect in the IR the down-graded energy photoelectrically absorbed in X-rays : 63 % of the faint 5-10 keV XMM sources are detected in the mid-IR by Fadda et al . ( 2001 ) . As discussed there , however , although as much as 90 % of the X-ray energy production could be converted to IR photons , no more than 20 % ( and possibly less ) of the Cosmic IR Background can be attributed to X-ray loud AGNs .