Oxidative phosphorylation and photophosphorylation are the two main mechanisms by which organisms generate ATP. In oxidative phosphorylation, electrons are passed through an electron transport chain in mitochondria to reduce oxygen to water, pumping protons across the inner mitochondrial membrane. The resulting proton gradient is used by ATP synthase to phosphorylate ADP to ATP. Photophosphorylation uses sunlight to drive electron transport and proton pumping across thylakoid membranes in chloroplasts to similarly synthesize ATP. Both mechanisms conserve the energy of electron transport as a proton gradient that is then used to power ATP synthesis, demonstrating the fundamental similarity between these critical energy conversion processes.