Variations of the Earth's atmospheric oxygen concentration (pO(2)) are thought to be closely tied to the evolution of life, with strong feedbacks between uni- and multicellular life and oxygen(1,2). On the geologic timescale, pO(2) is regulated by the burial of organic carbon and sulphur, as well as by weathering(3). Reconstructions of atmospheric O-2 for the past 400 million years have therefore been based on geochemical models of carbon and sulphur cycling(4-6). However, these reconstructions vary widely(4-10), particularly for the Mesozoic and early Cenozoic eras. Here we show that the abundance of charcoal in mire settings is controlled by pO(2), and use this proxy to reconstruct the concentration of atmospheric oxygen for the past 400 million years. We estimate that pO(2) was continuously above 26% during the Carboniferous and Permian periods, and that it declined abruptly around the time of the Permian-Triassic mass extinction. During the Triassic and Jurassic periods, pO(2) fluctuated cyclically, with amplitudes up to 10% and a frequency of 20-30 million years. Atmospheric oxygen concentrations have declined steadily from the middle of the Cretaceous period to present-day values of about 21%. We conclude, however, that variation in pO(2) was not the main driver of the loss of faunal diversity during the Permo-Triassic and Triassic-Jurassic mass extinction events.