According to the chemiosmosis theory of ATP generation. The ATP is generated utilizing the electrochemical gradient generated due to the accumulation of protons in the thylakoid lumen of chloroplast or peri-mitochondrial space in mitochondria. The accumulation of protons gives rise to an electric gradient, due to the accumulation of positive charge and a chemical gradient due to the accumulation of hydrogen atom. Related Theory The chemiosmotic hypothesis stated that a proton-motive force was responsible for driving the synthesis of ATP. In this hypothesis, protons would be pumped across the inner mitochondrial membrane as electrons went through the electron transfer chain. This would result in a proton gradient with a lower pH in the intermembrane space and an elevated pH in the matrix of the mitochondria. An intact inner mitochondrial membrane, impermeable to protons, is a requirement of such a model. The proton gradient and membrane potential are the proton-motive force that is used to drive ATP synthesis. In effect, the pH gradient acts as a "battery" which stores energy to produce ATP.