Changes in the chemical and isotopic composition of the solar nebula with time are reflected in the properties of different constituents that are preserved in chondritic meteorites. CR-group carbonaceous chondrites are among the most primitive of all chondrite types and must have preserved solar nebula records largely unchanged. We have analyzed the oxygen and magnesium isotopes in a range of the CR constituents of different formation temperatures and ages, including refractory inclusions and chondrules of various types. The results provide new constraints on the time variation of the oxygen isotopic composition of the inner (<5 AU ) solar nebula-the region where refractory inclusions and chondrules most likely formed. A chronology based on the decay of short-lived 26 Al (t 1 = 2 $ 0:73 Myr) indicates that the inner solar nebula gas was 16 O-rich when refractory inclusions formed, but less than 0.8 Myr later, gas in the inner solar nebula became 16 O-poor, and this state persisted at least until CR chondrules formed $1-2 Myr later. We suggest that the inner solar nebula became 16 O-poor because meter-sized icy bodies, which were enriched in 17 O and 18 O as a result of isotopic self-shielding during the ultraviolet photodissociation of CO in the protosolar molecular cloud or protoplanetary disk, agglomerated outside the snow line, drifted rapidly toward the Sun, and evaporated at the snow line. This led to significant enrichment in 16 O-depleted water, which then spread through the inner solar system. Astronomical studies of the spatial and temporal variations of water abundance in protoplanetary disks may clarify these processes.