  Accretion-powered X-ray pulsars are among the most luminous X-ray sources in
the Galaxy. However, despite decades of theoretical and observational work
since their discovery, no satisfactory model for the formation of the observed
X-ray spectra has emerged. In particular, the previously available theories are
unable to reproduce the power-law variation observed at high energies in many
sources. In this paper, we present the first self-consistent calculation of the
spectrum emerging from a pulsar accretion column that includes an explicit
treatment of the energization occurring in the shock. Using a rigorous
eigenfunction expansion method based on the exact dynamical solution for the
velocity profile in the column, we obtain a closed-form expression for the
Green's function describing the upscattering of radiation injected into the
column from a monochromatic source located at the top of the thermal mound,
near the base of the flow. The Green's function is convolved with a Planck
distribution to calculate the radiation spectrum resulting from the
reprocessing of blackbody photons emitted by the thermal mound. We demonstrate
that the energization of the photons in the shock naturally produces an X-ray
spectrum with a power-law shape at high energies and a blackbody shape at low
energies, in agreement with many observations of accreting X-ray pulsars.
