  Ultrafast outflows (UFOs) have recently been found in the spectra of a number
of active galactic nuclei (AGN) and are strong candidates for driving AGN
feedback. 1H0707-495 is a highly accreting narrow line Seyfert 1 and the second
most X-ray variable bright AGN. Previous studies found evidence of blueshifted
absorption at 0.1-0.2c in its spectrum. We perform a flux-resolved analysis of
the full XMM-Newton dataset on this AGN using both CCD and grating data,
focusing on the low flux spectrum. We find strong evidence for an ultrafast
outflow in absorption at $\sim$0.13c, with an ionisation parameter
$\log(\xi$/erg cm s$^{-1})=4.3$. Surprisingly, we also detect blueshifted
photoionised emission, with the velocity increasing at higher ionisation
states, consistent with a trend that has been observed in the UV spectrum of
this object. The bulk of the X-ray emitting material is moving at a velocity of
8000 km/s, with ionisation parameter $\log(\xi$/erg cm s$^{-1})=2.4$. The wind
kinetic power inferred from the UFO absorption is comparable to that of the UV
and X-ray emission features despite their different velocities and ionisation
states, suggesting that we are viewing an energy-conserving wind slowing down
and cooling at larger distances from the AGN.
