  Observation of CO emission around asymptotic giant branch (AGB) stars is the
primary method to determine gas mass-loss rates. While radiative transfer
models have shown that molecular levels of CO can become mildly inverted,
causing maser emission, CO maser emission has yet to be confirmed
observationally. High-resolution observations of the CO emission around AGB
stars now have the brightness temperature sensitivity to detect possible weak
CO maser emission. We used high angular resolution observations taken with the
Atacama Large Millimeter/submillimeter Array (ALMA) to observe the small-scale
structure of CO $J=3-2$ emission around the oxygen-rich AGB star W Hya. We find
CO maser emission amplifying the stellar continuum with an optical depth
$\tau\approx-0.55$. The maser predominantly amplifies the limb of the star
because CO $J=3-2$ absorption from the extended stellar atmosphere is strongest
towards the centre of the star. The CO maser velocity corresponds to a
previously observed variable component of high-frequency H$_2$O masers and with
the OH maser that was identified as the amplified stellar image. This implies
that the maser originates beyond the acceleration region and constrains the
velocity profile since we find the population inversion primarily in the inner
circumstellar envelope. We find that inversion can be explained by the
radiation field at 4.6 $\mu$m and that the existence of CO maser emission is
consistent with the estimated mass-loss rates for W Hya. However, the pumping
mechanism requires a complex interplay between absorption and emission lines in
the extended atmosphere. Excess from dust in the circumstellar envelope of W
Hya is not sufficient to contribute significantly to the required radiation
field at 4.6 $\mu$m. The interplay between molecular lines that cause the
pumping can be constrained by future multi-level CO observations.
