The thylakoid ATP synthase is a CF1FO-ATP synthase similar to the mitochondrial ATPase. It is integrated into the thylakoid membrane with the CF1-part sticking into the stroma. Thus, ATP synthesis occurs on the stromal side of the thylakoids where the ATP is needed for the light-independent reactions of photosynthesis.