Pulsars emit low-frequency radio waves through to high-energy gamma-rays that are generated anywhere from the surface out to the edges of the magnetosphere. Detecting correlated mode changes in the multi-wavelength emission is therefore key to understanding the physical relationship between these emission sites. Through simultaneous observations, we have detected synchronous switching in the radio and X-ray emission properties of PSR B0943+10. When the pulsar is in a sustained radio 'bright' mode, the X-rays show only an un-pulsed, non-thermal component. Conversely, when the pulsar is in a radio 'quiet' mode, the X-ray luminosity more than doubles and a 100%-pulsed thermal component is observed along with the non-thermal component. This indicates rapid, global changes to the conditions in the magnetosphere, which challenge all proposed pulsar emission theories. ; Comment: Paper published in Science including supplementary material