ATP synthase is a complex protein found in the inner mitochondrial membrane (in eukaryotes) or the plasma membrane (in prokaryotes). It uses the potential energy stored in the proton gradient across the membrane to drive the phosphorylation of ADP to ATP.