  We present a detailed analysis of the complex soft X-ray spectrum of NGC 4151
measured by the RGS instruments aboard XMM-Newton. The XMM-Newton RGS spectra
demonstrate that the soft X-ray emission is extremely rich in X-ray emission
lines and radiative recombination continua (RRC), with no clear evidence for
any underlying continuum emission. Line emission, and the associated RRC, are
clearly detected from hydrogen-like and helium-like ionization states of neon,
oxygen, nitrogen and carbon. The measured lines are blueshifted with a velocity
of between ~100-1000 km/s, with respect to the systemic velocity of NGC 4151,
approximately consistent with the outflow velocities of the absorption lines
observed in the UV, suggestive of an origin for the UV and soft X-ray emission
in the same material. Plasma diagnostics imply a range of electron temperatures
of ~1-5x10^4 K and electron densities of between 10^8-10^10 cm^-3. The soft
X-ray spectrum of NGC 4151 is extremely similar to that of NGC 1068, suggesting
that the soft X-ray excesses observed in many Seyfert galaxies may be composed
of similar emission features. Modelling the RGS spectra in terms of emission
from photoionized and photoexcited gas in an ionization cone reproduces all of
the hydrogen-like and helium-like emission features observed in the soft X-ray
spectrum of NGC 4151 in detail and confirms the correspondence between the soft
X-ray emission in NGC 4151 and NGC 1068.
