Context : Aims : We want to study the temporal and spectral behaviour of HU Aqr in the X-ray domain during different accretion states . Methods : We obtained spectra and light curves from four different XMM-Newton pointings covering intermediate and low states . The X-ray observations were accompanied with high time resolution photometry obtained with the Optima and ULTRACAM instruments . Results : On two occasions in May 2002 and 2003 HU Aqr was found in an intermediate state with the accretion rate reduced by a factor of 50 compared to earlier high state measurements . X-ray spectra in the intermediate state can be described by a model containing a blackbody component and hot thermal plasma . Contrary to the high state the ratio between soft and hard X-ray flux is nearly balanced . In agreement with previous measurements we observed a migration of the accretion spot and stream towards the line connecting both stars . The brightness of HU Aqr was further reduced by a factor of 80 during two low states in October 2003 and May 2005 , where it was detected at a luminosity of only L _ { X } = 4.7 \times 10 ^ { 28 } erg s ^ { -1 } . This luminosity would fit well with an active coronal emitter , but the relatively high plasma temperatures of 3.5 and 2.0 keV are more compatible with residual accretion . We updated the eclipse ephemeris of HU Aqr based on the eclipse egress of the accretion spot measured in various wavelength bands . The ( O - C ) -diagram of the observed accretion spot eclipse timings reveals complex deviations from a linear trend , which can be explained by a constant or cyclic period change or a combination thereof . The quadratic term implies a period decrease at a rate of \dot { P } _ { orb } = -7.. -11 \times 10 ^ { -12 } s s ^ { -1 } . In case the observed period change reflects a true angular momentum loss , this would be a factor of 30 larger than given by gravitational radiation . Conclusions :