Military occupation occurs when a belligerent state invades the territory of another state with the intention of holding the territory at least temporarily. While hostilities continue, the occupying state is prohibited by international law from annexing the territory or creating another state out of it, but the occupying state may establish some form of military administration over the territory and the population. Under the martial law imposed by this regime, residents are required to obey the occupying authorities and may be punished for not doing so. Civilians may also be compelled to perform a variety of nonmilitary tasks for the occupying authorities, such as the repair of roads and buildings, provided such work does not contribute directly to the enemy war effort.
Although the power of the occupying army is broad, the military authorities are obligated under international law to maintain public order, respect private property, and honor individual liberties. Civilians may not be deported to the occupant's territory to perform forced labor nor impressed into military service on behalf of the occupying army. Although measures may be imposed to protect and maintain the occupying forces, existing laws and administrative rules are not to be changed. Regulations of the Hague Conventions of 1907 and, more importantly, the 1949 geneva convention for the Protection of Civilian Persons in Time of War have attempted to codify and expand the protection afforded the local population during periods of military occupation.