Martial law is the imposition of the highest-ranking military officer as the military governor or as the head of the government, thus removing all power from the previous executive, legislative, and judicial branches of government. It is usually imposed temporarily when the government or civilian authorities fail to function effectively (e.g., maintain order and security, or provide essential services).
Martial law can be used by governments to enforce their rule over the public. Such incidents may occur after a coup d'état (such as Thailand in 2006 and 2014); when threatened by popular protest (China, Tiananmen Square protests of 1989); to suppress political opposition (Poland in 1981); or to stabilize insurrections or perceived insurrections (Canada, The October Crisis of 1970). Martial law may be declared in cases of major natural disasters; however, most countries use a different legal construct, such as a state of emergency.