Proton pumps function through the energy derived from ATP hydrolysis or electron transport. For instance, the H+-K+ ATPase in the gastric lining uses the energy from ATP to exchange intracellular H+ for extracellular K+, thereby acidifying the stomach contents. In mitochondria, complexes I, III, and IV of the electron transport chain act as proton pumps, using the energy from electron transfer to transport protons from the mitochondrial matrix to the intermembrane space.