The Amazon Basin contains almost one-half of the world's undisturbed tropical evergreen forest as well as large areas of tropical savanna. The forests account for about 10 per cent of the world's terrestrial primary productivity and for a similar fraction of the carbon stored in land ecosystems, and short-term field measurements suggest that these ecosystems are globally important carbon sinks. But tropical land ecosystems have experienced substantial interannual climate variability owing to frequent El Nino episodes in recent decades. Of particular importance to climate change policy is how such climate variations, coupled with increases in atmospheric CO2 concentration, affect terrestrial carbon storage. Previous model analyses have demonstrated the importance of temperature in controlling carbon storage. Here we use a transient process-based biogeochemical model of terrestrial ecosystems to investigate interannual variations of carbon storage in undisturbed Amazonian ecosystems in response to climate variability and increasing atmospheric CO2 concentration during the period 1980 to 1994. In El Nino years, which bring hot, dry weather to much of the Amazon region, the ecosystems act as a source of carbon to the atmosphere (up to 0.2 petagrams of carbon in 1987 and 1992). In other years, these ecosystems act as a carbon sink (up to 0.7 Pg C in 1981 and 1993). These fluxes are large; they compare to a 0.3 Pg C per year source to the atmosphere associated with deforestation in the Amazon Basin in the early 1990s. Soil moisture, which is affected by both precipitation and temperature, and which affects both plant and soil processes, appears to be an important control on carbon storage.