From a combination of high quality X-ray observations from the NASA Rossi X-ray Timing Explorer (RXTE), and infrared observations from the UK Infrared Telescope (UKIRT) we show that the medium energy X-ray (3-20 keV) and near infrared fluxes in the quasar 3C273 are highly correlated. It is widely believed that the X-ray emission in quasars like 3C273 arises from Compton scattering of low energy seed photons and our observations provide the first reliable detection of correlated variations in 3C273 between the X-ray band and any lower energy band. For a realistic electron distribution we demonstrate that it is probable that each decade of the seed photon distribution from the mm to IR waveband contributes roughly equally to the medium energy X-ray flux. However the expected mm variations are too small to be detected above the noise, probably explaining the lack of success of previous searches for a correlation between X-ray and mm variations. In addition we show that the infrared leads the X-rays by 0.75±0.25 days. These observations rule out the ‘External Compton’ emission process for the production of the X-rays.