Geological history of oxygen
Stage 1 (3.85–2.45 Ga): Practically no O2 in the atmosphere.
Stage 2 (2.45–1.85 Ga): O2 produced, but absorbed in oceans and seabed rock.
Stage 3 (1.85–0.85 Ga): O2 starts to gas out of the oceans, but is absorbed by land surfaces and formation of ozone layer.
Stages 4 and 5 (0.85 Ga–present): O2 sinks filled, the gas accumulates.
Although oxygen is the most abundant element in Earth's crust, due to its high reactivity it mostly exists in compound (oxide) forms such as water, carbon dioxide, iron oxides and silicates. Before photosynthesis evolved, Earth's atmosphere and ancient superocean had little free elemental diatomic oxygen (O2). Small quantities of oxygen were released by geological processes, but did not build up in the prebiotic atmosphere due to reactions with then-abundant reducing gases such as atmospheric methane and hydrogen sulfide and surface reductants such as ferrous iron and sulfur.
Photoautotrophs capable of oxygenic photosynthesis appeared during the Mesoarchean era, and over the course of the next billion years began releasing oxygen into the ocean. Eventually, the accumulated oxygen production overwhelmed the total reducing capacity of the Earth's surface — the ocean first, then the atmosphere — and free oxygen began building up in the atmosphere at approximately 2.45 Ga during the Neoarchean-Paleoproterozoic boundary. This led to a fundamental and irreversible transition of the Earth's atmosphere from a previously reducing secondary atmosphere to an oxidizing tertiary atmosphere, a paleogeological event known as the Great Oxygenation Event (GOE), which also led to a global icehouse known as the Huronian glaciation and the deposition of oxidized banded iron formations during the early Proterozoic. The concentrations of O2 attained were less than 0.1% of present atmospheric level and probably fluctuated greatly. Starting 550-850Mya a second event known as the Neoproterozoic Oxygenation Event lead to oxygen levels similar or even higher than the present. The increase in oxygen concentrations had wide-ranging and significant impacts on Earth's geochemistry and biosphere. Detailed connections between oxygen and evolution remain elusive.