  Optical observations of the Oort cloud comet C/2017 K2 (PANSTARRS) show that
its activity began at large heliocentric distances (up to 35 au), which cannot
be explained by either the sublimation or the crystallization of water ice.
Supervolatile sublimation, most likely of carbon monoxide (CO), has been
proposed as a plausible driver of the observed mass loss. Here, we present the
detection of the J = 2$-$1 rotational transition in outgassed CO from C/2017 K2
when at heliocentric distance $r_H$ = 6.72 au, using the James Clerk Maxwell
Telescope. The CO line is blue-shifted by 0.20$\pm$0.03 km s$^{-1}$ with an
area and width of 8.3$\pm$2.3 mK km s$^{-1}$ and $0.28\pm$0.08 km s$^{-1}$,
respectively. The CO production rate is $Q_{CO} = (1.6\pm0.5) \times10^{27}$
s$^{-1}$. These are the first observations of a gaseous species in C/2017 K2
and provide observational confirmation of the role of supervolatile sublimation
in this comet.
