Pulsars emit from low-frequency radio waves up to high-energy gamma-rays, generated anywhere from the stellar surface out to the edge of the magnetosphere. Detecting correlated mode changes across the electromagnetic spectrum is therefore key to understanding the physical relationship among the emission sites. Through simultaneous observations, we 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 unpulsed, nonthermal 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 nonthermal component. This indicates rapid, global changes to the conditions in the magnetosphere, which challenge all proposed pulsar emission theories.