The inner mitochondrial membrane contains the electron transport chain complexes and ATP synthase. The process of oxidative phosphorylation, which generates the vast majority of ATP in cellular respiration, involves creating a proton gradient across the inner membrane (protons pumped from the matrix to the intermembrane space) and then using the potential energy of this gradient as protons flow back into the matrix through ATP synthase, which catalyzes the synthesis of ATP from ADP and phosphate.