Avi Bell and his colleague Dov Shefi dissected the so-called “occupation” in depth in a 2010 article for Israel Affairs.
The two sentences in question comprise Article 42 of the 1907 Hague Convention: “Territory is considered occupied when it is actually placed under the authority of the hostile army. The occupation extends only to the territory where such authority has been established and can be exercised.”
The ICRC maintains a FAQ on Occupation and International Humanitarian Law. Point 5, concerning when an occupation ends, is particularly relevant to today’s topic.