  We perform the first global QCD analysis of parton distribution functions
(PDFs) in the pion, combining $\pi A$ Drell-Yan data with leading neutron
electroproduction from HERA within a Monte Carlo approach based on nested
sampling. Inclusion of the HERA data allows the pion PDFs to be determined down
to much lower values of $x$, with relatively weak model dependence from
uncertainties in the chiral splitting function. The combined analysis reveals
that gluons carry a significantly higher pion momentum fraction, $\sim 30\%$,
than that inferred from Drell-Yan data alone, with sea quarks carrying a
somewhat smaller fraction, $\sim 15\%$, at the input scale. Within the same
effective theory framework, the chiral splitting function and pion PDFs can be
used to describe the $\bar d-\bar u$ asymmetry in the proton.
