As high-energy electrons move along a series of protein complexes, they pump hydrogen ions (protons) across the membrane, producing a gradient of H+. The protons diffuse back (chemiosmosis) through the enzyme ATP synthase to form ATP. This process requires oxygen (the final electron acceptor) and releases water.