The history of the Earth has been characterized by a series of major transitions separated by long periods of relative stability. The largest chemical transition was the 'Great Oxidation', approximately 2.4 billion years ago, when atmospheric oxygen concentrations rose from less than 10(-5) of the present atmospheric level (PAL) to more than 0.01 PAL, and possibly to more than 0.1 PAL. This transition took place long after oxygenic photosynthesis is thought to have evolved, but the causes of this delay and of the Great Oxidation itself remain uncertain. Here we show that the origin of oxygenic photosynthesis gave rise to two simultaneously stable steady states for atmospheric oxygen. The existence of a low-oxygen (less than 10(-5) PAL) steady state explains how a reducing atmosphere persisted for at least 300 million years after the onset of oxygenic photosynthesis. The Great Oxidation can be understood as a switch to the high-oxygen (more than 5 x 10(-3) PAL) steady state. The bistability arises because ultraviolet shielding of the troposphere by ozone becomes effective once oxygen levels exceed 10(-5) PAL, causing a nonlinear increase in the lifetime of atmospheric oxygen. Our results indicate that the existence of oxygenic photosynthesis is not a sufficient condition for either an oxygen-rich atmosphere or the presence of an ozone layer, which has implications for detecting life on other planets using atmospheric analysis and for the evolution of multicellular life.