  We investigate the impact of a cosmic X-ray background (CXB) on Population
III stars forming in a minihalo at $z\simeq25$. Using the smoothed particle
hydrodynamics code GADGET-2, we attain sufficient numerical resolution to
follow gas collapsing into the centre of the minihalo from cosmological initial
conditions up to densities of $10^{12}\,{\rm cm}^{-3}$, at which point we form
sink particles. This allows us to study how the presence of a CXB affects the
formation of H$_2$ and HD in the gas prior to becoming fully molecular. Using a
suite of simulations for a range of possible CXB models, we follow each
simulation for 5000\yr after the first sink particle forms. The CXB provides
two competing effects, with X-rays both heating the gas and increasing the free
electron fraction, allowing more H$_2$ to form. X-ray heating dominates below
$n\sim1\,{\rm cm}^{-3}$, while the additional H$_2$ cooling becomes more
important above $n\sim10^2\,{\rm cm}^{-3}$. The gas becomes optically thick to
X-rays as it exits the quasi-hydrostatic `loitering phase,' such that the
primary impact of the CXB is to cool the gas at intermediate densities,
resulting in an earlier onset of baryonic collapse into the dark matter halo.
At the highest densities, self-shielding results in similar thermodynamic
behaviour across a wide range of CXB strengths. Consequently, we find that star
formation is relatively insensitive to the presence of a CXB; both the number
and the characteristic mass of the stars formed remains quite similar even as
the strength of the CXB varies by several orders of magnitude.
