  We report the discovery of weak yet hard X-ray emission from the Wolf-Rayet
(WR) star WR142 with the XMM-Newton X-ray telescope. Being of spectral subtype
WO2, WR142 is a massive star in a very advanced evolutionary stage, short
before its explosion as a supernova or gamma-ray burst. This is the first
detection of X-ray emission from a WO-type star. We rule out any serendipitous
X-ray sources within approx 1" of WR142. WR142 has an X-ray luminosity of
L_X=7\times10^{30} erg/s, which constitutes only $\lsim 10^{-8}$ of its
bolometric luminosity. The hard X-ray spectrum suggests a plasma temperature of
about 100 MK. Commonly, X-ray emission from stellar winds is attributed to
embedded shocks due to the intrinsic instability of the radiation driving. From
qualitative considerations we conclude that this mechanism cannot account for
the hardness of the observed radiation. There are no hints for a binary
companion. Therefore the only remaining, albeit speculative explanation must
refer to magnetic activity. Possibly related, WR142 seems to rotate extremely
fast, as indicated by the unusually round profiles of its optical emission
lines. Our detection implies that the wind of WR142 must be relatively
transparent to X-rays, which can be due to strong wind ionization, wind
clumping, or non-spherical geometry from rapid rotation.
