  We report the discovery of peculiar X-ray spectral variability in the binary
radio millisecond pulsar PSR J0024--7204W in the globular cluster 47 Tucanae.
The observed emission consists of a dominant non-thermal component, which is
eclipsed for a portion of the orbit, and a thermal component, which appears to
be persistent. We propose that the non-thermal X-rays originate in a
relativistic intrabinary shock, formed due to interaction between the
relativistic particle wind from the pulsar and matter from the main-sequence
companion star, while the thermal photons are from the heated magnetic polar
caps of the millisecond pulsar. At optical wavelengths, the emission exhibits
large-amplitude variations at the orbital period, which can be attributed to
heating of one side of the tidally-locked secondary star by the pulsar wind.
The observed X-ray and optical properties of PSR J0024--7204W are remarkably
similar to those of the low mass X-ray binary and X-ray millisecond pulsar SAX
J1808.4--3658 in quiescence. This supports the conjecture that the non-thermal
X-ray emission and optical modulations seen in the SAX J1808.4--3658 system in
a quiescent state are due to interaction between the wind from a reactivated
rotation-powered pulsar and matter from the companion star. The striking
similarities between the two systems provide support for the long-sought
connection between millisecond radio pulsars and accreting neutron star
systems.
