The thermal structure and composition of the atmosphere is determined fundamentally by the incoming solar irradiance. Radiation at ultraviolet wavelengths dissociates atmospheric molecules, initiating chains of chemical reactions-specifically those producing stratospheric ozone-and providing the major source of heating for the middle atmosphere, while radiation at visible and near-infrared wavelengths mainly reaches and warms the lower atmosphere and the Earth's surface. Thus the spectral composition of solar radiation is crucial in determining atmospheric structure, as well as surface temperature, and it follows that the response of the atmosphere to variations in solar irradiance depends on the spectrum. Daily measurements of the solar spectrum between 0.2µm and 2.4µm, made by the Spectral Irradiance Monitor (SIM) instrument on the Solar Radiation and Climate Experiment (SORCE) satellite since April 2004, have revealed that over this declining phase of the solar cycle there was a four to six times larger decline in ultraviolet than would have been predicted on the basis of our previous understanding. This reduction was partially compensated in the total solar output by an increase in radiation at visible wavelengths. Here we show that these spectral changes appear to have led to a significant decline from 2004 to 2007 in stratospheric ozone below an altitude of 45km, with an increase above this altitude. Our results, simulated with a radiative-photochemical model, are consistent with contemporaneous measurements of ozone from the Aura-MLS satellite, although the short time period makes precise attribution to solar effects difficult. We also show, using the SIM data, that solar radiative forcing of surface climate is out of phase with solar activity. Currently there is insufficient observational evidence to validate the spectral variations observed by SIM, or to fully characterize other solar cycles, but our findings raise the possibility that the effects of solar variability on temperature throughout the atmosphere may be contrary to current expectations.