The electrons that gained energy and left the chlorophyll move along a series of electron-carrier proteins embedded within the thylakoid membrane, releasing energy which is used to pump protons across the chloroplast membranes, creating an electrochemical gradient. The protons then pass back through ATP synthase, producing ATP.