  To date, infrared interferometry at best achieved contrast ratios of a few
times $10^{-4}$ on bright targets. GRAVITY, with its dual-field mode, is now
capable of high contrast observations, enabling the direct observation of
exoplanets. We demonstrate the technique on HR8799, a young planetary system
composed of four known giant exoplanets. We used the GRAVITY fringe tracker to
lock the fringes on the central star, and integrated off-axis on the HR8799e
planet situated at 390 mas from the star. Data reduction included
post-processing to remove the flux leaking from the central star and to extract
the coherent flux of the planet. The inferred K band spectrum of the planet has
a spectral resolution of 500. We also derive the astrometric position of the
planet relative to the star with a precision on the order of 100$\,\mu$as. The
GRAVITY astrometric measurement disfavors perfectly coplanar stable orbital
solutions. A small adjustment of a few degrees to the orbital inclination of HR
8799 e can resolve the tension, implying that the orbits are close to, but not
strictly coplanar. The spectrum, with a signal-to-noise ratio of $\approx 5$
per spectral channel, is compatible with a late-type L brown dwarf. Using
Exo-REM synthetic spectra, we derive a temperature of $1150\pm50$\,K and a
surface gravity of $10^{4.3\pm0.3}\,$cm/s$^{2}$. This corresponds to a radius
of $1.17^{+0.13}_{-0.11}\,R_{\rm Jup}$ and a mass of $10^{+7}_{-4}\,M_{\rm
Jup}$, which is an independent confirmation of mass estimates from evolutionary
models. Our results demonstrate the power of interferometry for the direct
detection and spectroscopic study of exoplanets at close angular separations
from their stars.
