Context.A cataclysmic variable is a binary system consisting of a white dwarf that accretes material from a secondary object via the Roche-lobe mechanism. In the case of long enough observation, a detailed temporal analysis can be performed, allowing the physical properties of the binary system to be determined. Aims. We present an XMM-Newton observation of the dwarf nova HT Cas acquired to resolve the binary system eclipses and constrain the origin of the X-rays observed. We also compare our results with previous ROSAT and ASCA data. Methods. After the spectral analysis of the three EPIC camera signals, the observed X-ray light curve was studied with well known techniques and the eclipse contact points obtained. Results. The X-ray spectrum can be described by thermal bremsstrahlung of temperature kT 1 = 6.89 ± 0.23 keV plus a black-body component (upper limit) with temperature kT 2 = 30 +8 −6 eV. Neglecting the black-body, the bolometric absorption corrected flux is F Bol = (6.5 ± 0.1) × 10 −12 erg s −1 cm −2 , which, for a distance of HT Cas of 131 pc, corresponds to a bolometric luminosity of (1.33 ± 0.02) × 10 31 erg s −1 . In a standard accretion scenario where L BL 0.125L acc assuming Ω WD 0.5Ω K (R WD ), the amount of matter accreting onto the central white dwarf is found to be 1.7 × 10 −11 M yr −1 . The study of the eclipse in the EPIC light curve permits us to constrain the size and location of the X-ray emitting region, which turns out to be close to the white dwarf radius. We measure an X-ray eclipse somewhat smaller (but only at a level of 1.5σ) than the corresponding optical one. If this is the case, we have possibly identified the signature of either high latitude emission or a layer of X-ray emitting material partially obscured by an accretion disk.