Martial law
Martial law is the replacement of civilian government by military rule and the suspension of civilian legal processes for military powers. Martial law can continue for a specified amount of time, or indefinitely, and standard civil liberties may be suspended for as long as martial law continues. Most often, martial law is declared in times of war and/or emergencies such as civil unrest and natural disasters. Alternatively, martial law may be declared in instances of military coup d'états.

Overview
Despite the fact that it has been declared frequently throughout history, martial law is still often described as largely elusive as a legal entity. References to martial law date back to 1628 England, when a man named Lord Hale described martial law as, “no Law, but something indulged rather than allowed as a Law.” Despite being centuries old, this quote remains true in many countries around the world today. Most often, the implementation of martial law arises from necessity rather than legal right, and while some countries have provisions explicitly permitting the use of martial law, many do not. For countries that do not explicitly permit the declaration of martial law, but where martial law has been declared, the legal justification for it is often the common law doctrine of necessity, or some variation of it.

Common law doctrine of necessity and martial law
One legal theory most frequently associated with martial law is the common law doctrine of necessity. While many countries, the United States for example, do not have the explicit constitutional right to declare martial law, scholars often interpret the law of the United States to allow for the implementation of martial law in times of necessity. Countries such as Pakistan have famously implemented this rationale as well.

Use
Martial law can be used by governments to enforce their rule over the public, as seen in multiple countries listed below. Such incidents may occur after a coup d'état (Thailand in 2006 and 2014, and Egypt in 2013); when threatened by popular protest (China, Tiananmen Square protests of 1989); to suppress political opposition (martial law in Poland in 1981); or to stabilize insurrections or perceived insurrections. 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.
Martial law has also been imposed during conflicts, and in cases of occupations, where the absence of any other civil government provides for an unstable population. Examples of this form of military rule include post World War II reconstruction in Germany and Japan, the recovery and reconstruction of the former Confederate States of America during Reconstruction Era in the United States of America following the American Civil War, and German occupation of northern France between 1871 and 1873 after the Treaty of Frankfurt ended the Franco-Prussian War.
Typically, the imposition of martial law accompanies curfews; the suspension of civil law, civil rights, and habeas corpus; and the application or extension of military law or military justice to civilians. Civilians defying martial law may be subjected to military tribunal (court-martial).

By country/region
Armenia
During the 2020 Nagorno-Karabakh war, Armenian prime minister Nikol Pashinyan declared martial law.

Australia
The Black War was a period of violent conflict between British colonists and Aboriginal Australians in Tasmania from the mid-1820s to 1832. With an escalation of violence in the late 1820s, Lieutenant-Governor George Arthur declared martial law in November 1828—effectively providing legal immunity for killing Aboriginal people. It would remain in force for more than three years, the longest period of martial law in the history of the British colonies on the Australian continent. As of 2022, martial law has never been declared since the continent became a nation.

Brunei
Brunei has been under a martial law since a rebellion occurred on 8 December 1962 known as the Brunei Revolt and was put down by British troops from Singapore. The Sultan of Brunei, Sultan Haji Hassanal Bolkiah Mu'izzaddin Waddaulah, is presently the head of state and also the Minister of Defense and Commander in Chief of Royal Brunei Armed Forces.

Canada
The War Measures Act was a Parliament of Canada statute that allowed the government to assume sweeping emergency powers, stopping short of martial law, i.e., the military did not administer justice, which remained in the hands of the courts. The act was invoked three times: During World War I, World War II, and the October Crisis of 1970. In 1988, the War Measures Act was replaced by the Emergencies Act.
During the colonial era, martial law was proclaimed and applied in the territory of the Province of Quebec during the invasion of Canada by the Continental Army during the American Revolutionary War in 1775–1776. It was also applied twice in the Province of Lower Canada during the 1837–1838 insurrections. On December 5, following the events of November 1837, martial law was proclaimed in the district of Montreal by Governor Gosford, without the support of the Legislative Assembly of Lower Canada. It was imposed until April 27, 1838. Martial law was proclaimed a second time on November 4, 1838, this time by acting Governor John Colborne, and was applied in the district of Montreal until August 24, 1839.

China
In China, martial law in the Beiyang government could be dated back to the final year of the Qing dynasty. The outline of a 1908 draft constitution—modeled on Japan's Meiji Constitution—included provisions for martial law. The Provisional Government of the Republic of China promulgated the Provisional Constitution in March 1911, which authorized the President to declare martial law in times of emergency. The Martial Law Declaration Act were issued by the Nationalist Government later in 1920s and amended in 1940s. Following World War II, the island of Taiwan came back to China's control given the impending withdrawal of Japanese forces and colonial government. Martial law was declared first in 1947 in Taiwan Province after the February 28 incident, then again in 1949 as the Chinese Civil War was also raging across the country despite the democracy promised in the Constitution of the Republic of China (the central government refused to implement the constitution on Taiwan until after 1949).
After the Nationalist-led central government of China lost control of the mainland to the Chinese Communist Party and retreated to Taiwan in 1949, the perceived need to suppress Communist activities in Taiwan was utilised as a rationale for not lifting martial law until thirty-eight years later in 1987, just prior to the death of then President Chiang Ching-kuo.  Taiwan's period of martial law was one of the longest in modern history, after that of Syria (1967–2011).Martial law was imposed in Beijing in 1989 following the Tiananmen Square protests of 1989 by the Communist-ruled government on mainland China.

Egypt
In Egypt, a State of Emergency has been in effect almost continuously since 1967. Following the assassination of President Anwar el-Sadat in 1981, a state of emergency was declared. Egypt has been under state of emergency ever since with few short exceptions. Parliament had renewed emergency laws every three years since they were imposed. The legislation was extended in 2003 and were due to expire at the end of May 2006; plans were in place to replace it with new anti-terrorism laws. But after the Dahab bombings in April of that year, state of emergency was renewed for another two years. In May 2008 there was a further extension to June 2010. In May 2010, the state of emergency was further extended, albeit with a promise from the government to be applied only to 'Terrorism and Drugs' suspects.
A State of Emergency gives military courts the power to try civilians and allows the government to detain for renewable 45-day periods and without court orders anyone deemed to be threatening state security. Public demonstrations are banned under the legislation. On 10 February 2011, the ex-president of Egypt, Hosni Mubarak, promised the deletion of the relevant constitutional article that gives legitimacy to State of Emergency in an attempt to please the mass number of protesters that demanded him to resign. On 11 February 2011, the president stepped down and the vice president Omar Suleiman de facto introduced the country to martial law when transferring all civilian powers from the presidential institution to the military institution. It meant that the presidential executive powers, the parliamentary legislative powers and the judicial powers all transferred directly into the military system which may delegate powers back and forth to any civilian institution within its territory.
The military issued in its third announcement the "end of the State of Emergency as soon as order is restored in Egypt". Before martial law, the Egyptian parliament under the constitution had the civilian power to declare a State of Emergency. When in martial law, the military gained all powers of the state, including to dissolve the parliament and suspend the constitution as it did in its fifth announcement. Under martial law, the only legal framework within the Egyptian territory is the numbered announcements from the military. These announcements could for instance order any civilian laws to come back into force. The military announcements (communiques) are the de facto only current constitution and legal framework for the Egyptian territory. It means that all affairs of the state are bound by the Geneva Conventions.

Finland
The Preparedness Act (SDK 1552/2011, Finnish: valmiuslaki) is a law in Finnish legislation, enacted in accordance with the constitutional procedure. The purpose of the Act is to give the authorities sufficient powers in times of war and other exceptional circumstances. During a state of defence (war), there is also the Defence Status Act, the provisions of which override the Preparedness Act. Together, the two laws form the Emergency Preparedness Act. The current Emergency Preparedness Act and its predecessor of the same name (1080/1991) were designed to replace the emergency provisions previously scattered over several different acts.

Iceland
The Icelandic constitution provides no mechanism for the declaration of war, martial law nor state of emergency.

India
There is no implicit mention of Martial Law in the Indian constitution with the exception of Article 34 which gives Parliament the power to indemnify persons in respect of acts done in territories where martial law was in force and to legitimize such actions. But in the text itself, there is no mention of any grants of power to declare Martial Law.During the British Raj, Martial law was effectively declared in the Defense of India Act,1915 and the Defense of India Act, 1939. It was also declared in most of the Punjab during 1919, As a response to tensions caused by the Amritsar Massacre, These tensions were caused due to the controversial Rowlatt Act.

Indonesia
On May 18, 2003, during a military activity in Aceh, under the order of the president, Indonesian Army Chief imposed martial law for a period of six months to eliminate Acehnese separatists.

Iran
On September 7, 1978, in response to public demonstrations protesting the perceived government involvement in the death of the son of Ayatollah Khomeini, Mostafa Khomeini, Shah Mohammad Reza Pahlavi appointed Chief of Army Staff General Gholam Ali Oveisi as the military governor of the capital city of Tehran. On September 8, the government effectively declared martial law on the capital along with several other cities throughout the country, after which further protests erupted that lead to the army opening fire on a group of protesters in Tehran's Jaleh Square on the same day. Estimates on the number of casualties vary; However, according to Iranian human rights activist Emadeddin Baghi, the number of people killed was 88 of which 64 were gunned down in Jaleh Square. The day is often referred to as Black Friday. Unable to control the unrest, the Shah dissolved the civil government headed by Prime Minister Jafar Sharif-Emami on November 6 and appointed General Gholam Reza Azhari as the prime minister whom ultimately failed in his efforts to restore order to the country. As he was preparing to leave the country, the Shah dissolved the military government and appointed Shapour Bakhtiar, a reformist critic of his rule, as the new prime minister on January 4, 1979. Bakhtiar's government fell on February 11 and gave rise to the Islamic Republic and the creation of a new constitution.Article 79 of the Constitution of the Islamic Republic of Iran forbids the proclamation of martial law without the approval of the Islamic Consultative Assembly.

Ireland
In 1916, during the Easter Rising, Lord Wimborne the Lord Lieutenant of Ireland, declared martial law to maintain order in the streets of Dublin. This was later extended both in duration and geographical reach to the whole of the country with the consent of the British government. Much of Ireland was declared under martial law by the British authorities during the Irish War of Independence. A large portion of Ireland was also under de facto martial law during the Irish Civil War.
The current Irish Constitution allows for martial law if the government declares a state of emergency; however capital punishment is prohibited in all circumstances, including a state of emergency.

Israel
Military administrative government was in effect from 1949 to 1966 over some geographical areas of Israel having large Arab populations, primarily the Negev, Galilee, and the Triangle. The residents of these areas were subject to martial law. The Israel Defense Forces enforced strict residency rules. Any Arab not registered in a census taken during November 1948 was deported. Permits from the military governor had to be procured to travel more than a given distance from a person's registered place of residence, and curfew, administrative detentions, and expulsions were common. Although the military administration was officially for geographical areas, and not people, its restrictions were seldom enforced on the Jewish residents of these areas. In the early 1950s, martial law ceased to be in effect for those Arab citizens living in predominantly Jewish cities of Jaffa, Ramla, and Lod, constituting a total of approximately 15% of the Arab population of Israel. But military rule remained in place on the remaining Arab population elsewhere within Israel until 1966.This period is remembered for its extreme crackdown on political rights, as well as unaccountable military brutality. Most political and civil organization was prohibited. Flying of Palestinian flag, as well as other expressions of Palestinian patriotism were prohibited. Furthermore, despite theoretical guarantee of full political rights, military government personnel frequently made threats against Arabs citizens if they did not vote in elections for the candidates favored by the authorities. Perhaps the most commemorated incidence of military brutality in this time period was the Kafr Qasim massacre in 1956, in which the Israel Border Police killed 48 people (19 men, 6 women and 23 children aged 8–17) as they were returning home from work in the evening. The Israeli army had ordered that all Arab villages in the proximity of the Green Line be placed under curfew. However, this order came into effect before the residents of these localities, including residents of Kafr Qasim, were notified.
Following the 1967 war, in which the Israeli army occupied the West Bank, Gaza Strip, the Golan Heights in Syria, and the Sinai Peninsula in Egypt, martial law over the Palestinian population as well as the Jordanian, Syrian, and Egyptian populations in these areas was put in place. In 1993, the Oslo I agreements facilitated limited self-rule for Palestinians under the Palestinian National Authority. Officially, only parts of Area C in the West Bank are under martial law.During the 2006 Lebanon war, martial law was declared by Defense Minister Amir Peretz over the north of the country. The Israel Defense Forces were granted the authority to issue instructions to civilians, and to close down offices, schools, camps and factories in cities considered under threat of attack, as well as to impose curfews on cities in the north.Instructions of the Home Front Command are obligatory under martial law, rather than merely recommended. The order signed by Peretz was in effect for 48 hours and was extended by the Cabinet and the Knesset Foreign Affairs and Defense Committee over the war's duration.

Mauritius
Mauritius is known as being a "Westminster" style of democracy but a peculiar system that was imposed in Mauritius during a period of civil unrest in 1968 as an emergency measure, has never been repealed and is still used by the police force there to this day. The system, which has no apparent foundation in the constitution of Mauritius, enables the police to arrest without having to demonstrate reasonable suspicion that a crime has been carried out but simply on the submission of "provisional information" to the magistrate. The accused is then placed on remand or bail and required to report to the police or the court on a regular basis, sometimes every day. There are examples of this system being used to intimidate or coerce individuals in civil litigations.

Myanmar
On February 1, 2021, democratically elected members of Myanmar, known as the National League for Democracy, were overthrown by Myanmar's military, called the Tatmadaw. This military placed their power in a military junta. Five days following the coup, factory workers around Yangon (a region in Myanmar) held protests against the coup regime. On March 14, 2021, security forces killed upwards of sixty-five protestors in the town of Hlaingtharyar. As a result, the military junta declared martial law over the region of Yangon, including over the majority of industrial zones. As of February 22, 2023, Myanmar's military junta has declared martial law over a total of 50 townships in the regions of Chin, Kachin, Karen, Karenni, Mon States, Yangon and Mandalay. News reports indicate that since the military coup in February 2021, and the subsequent declaration of martial law in Myanmar regions, military tribunals have sentenced more than 100 people to death. Reports further indicate that a total of three townships in Myanmar's northwest reside under the “executive and judicial jurisdiction of regional military commander Maj. Gen. Than Htike,” who has since been sanctioned by the European Union for alleged human rights violations since Myanmar's declaration of martial law.

Pakistan
Martial law was declared in Pakistan on 7 October 1958, by President Iskander Mirza who then appointed General Muhammad Ayub Khan as the Chief Martial Law Administrator and Aziz Ahmad as Secretary General and Deputy Chief Martial Law Administrator. However, three weeks later General Ayub—who had been openly questioning the authority of the government before the imposition of martial law—deposed Iskandar Mirza on 27 October 1958 and assumed the presidency that practically formalized the militarization of the political system in Pakistan. Four years later a new document, Constitution of 1962, was adopted. The second martial law was imposed on 25 March 1969, when President Ayub Khan abrogated the Constitution of 1962 and handed over power to the Army Commander-in-Chief, General Agha Mohammad Yahya Khan. On assuming the presidency, General Yahya Khan acceded to popular demands by abolishing the one-unit system in West Pakistan and ordered general elections on the principle of one man one vote.
The third was imposed by Zulfikar Ali Bhutto, the first civilian to hold this post in Pakistan after the Bangladesh Liberation War. On 21 December 1971, Bhutto took this post as well as that of President.
The fourth was imposed by the General Muhammad Zia-ul-Haq on 5 July 1977. After several tumultuous years, which witnessed the secession of East Pakistan to form Bangladesh, politician Zulfikar Ali Bhutto took over in 1971 as the first civilian martial law administrator in recent history, imposing selective martial law in areas hostile to his rule, such as the country's largest province, Balochistan. Following widespread civil disorder, General Zia overthrew Bhutto and imposed martial law in its totality on July 5, 1977, in a bloodless coup d'état. Unstable areas were brought under control through indirect military action, such as Balochistan under Martial Law Governor, General Rahimuddin Khan. Civilian government resumed in 1988 following General Zia's death in an aircraft crash.
On October 12, 1999, the government of Prime Minister Nawaz Sharif was dissolved, and the Army took control once more. But no martial law was imposed. General Pervez Musharraf took the title of Chief Executive until the President of Pakistan Rafiq Tarar resigned and General Musharraf became president. Elections were held in October 2002 and Mir Zafarullah Khan Jamali became Prime Minister of Pakistan. Jamali premiership was followed by Chaudhry Shujaat Hussain and Shaukat Aziz. While the government was supposed to be run by the elected prime minister, there was a common understanding that important decisions were made by the President General Musharraf.
On November 3, 2007, President General Musharraf declared the state of emergency in the country which is claimed to be equivalent to the state of martial law as the constitution of Pakistan of 1973 was suspended, and the Chief Justices of the Supreme Court were fired.
On November 12, 2007, Musharraf issued some amendments in the Military Act, which gave the armed forces some additional powers.

Philippines
During the Second World War, President José P. Laurel placed the Philippines (then a client state of Imperial Japan) under martial law via Proclamation № 29, dated 21 September 1944 and enforced the following day at 09:00 PST. Proclamation № 30 was issued on 23 September, declaring the existence of a state of war between the Philippines and the United States and the United Kingdom, effective 10:00 that day.
The country was under martial law again from 1972 to 1981 under President Ferdinand Marcos. Proclamation № 1081 ("Proclaiming a State of Martial Law in the Philippines") was signed on 21 September 1972 and came into force on 23 September. The official reason behind the declaration was to suppress increasing civil strife and the threat of a communist takeover, particularly after a series of bombings (including the Plaza Miranda bombing) and an assassination attempt on Defense Minister Juan Ponce Enrile in Mandaluyong.
The policy of martial law was initially well received, but it eventually proved unpopular as the military's human rights abuses (e.g. use of torture in intelligence gathering, forced disappearances), along with the decadence and excess of the Marcos family and their allies, had emerged. Coupled with economic downturns, these factors fermented dissent in various sectors (e.g. the urban middle class) that crystallised with the assassination of jailed oppositionist Senator Benigno Aquino Jr. in 1983, and widespread fraud in the 1986 snap elections. These eventually led to the 1986 People Power Revolution that ousted Marcos and forced him into exile in Hawaii where he died in 1989; his rival presidential candidate and Aquino's widow, Corazon, was installed as his successor.
During this 9-year period, curfews were implemented as a safety measure. Majority of radio and television networks were suspended. Journalists who were accused of speaking against the government were taken as political prisoners, some of them to be physically abused and tortured by the authorities.
Others have stated that the implementation of Martial Law was taken advantage by the Marcos regime. Billion pesos worth of property and ill-gotten wealth was said to be acquired by Marcos' consort, First Lady Imelda Marcos. This alleged money laundering issue was brought back recently, particularly in the PiliPinas Debates 2016 for the recently held Philippine Presidential Elections on May 9, 2016. Ferdinand "Bongbong" Marcos, Jr., Marcos' son, ran for the vice presidency and lost.
There were rumours that President Gloria Macapagal Arroyo was planning to impose martial law to end military coup d'etat plots, general civilian dissatisfaction, and criticism of her legitimacy arising from the dubious results of the 2004 presidential elections. Instead, a State of National Emergency was imposed in 2006 from 24 February to 3 March, in order to quash a coup attempt and quell protesters.
On 4 December 2009, President Arroyo officially placed the Province of Maguindanao under a state of martial law through Proclamation № 1959. As with the last imposition, the declaration suspended the writ of habeas corpus in the province. The announcement came days after hundreds of government troops were sent to the province to raid the armories of the powerful Ampatuan clan. The Ampatuans were implicated in the massacre of 58 persons, including women from the rival Mangudadatu clan, human rights lawyers, and 31 media workers. Cited as one of the bloodiest incidents of political violence in Philippine history, the massacre was condemned worldwide as the worst loss of life of media professionals in one day.On 23 May 2017, President Rodrigo Duterte declared martial law throughout the main southern island of Mindanao, through Proclamation No. 216, due to the attack of Maute Group in Marawi City, Lanao del Sur. It was announced in a briefing in Moscow by Secretary Ernesto Abella, and was in effect until December 2019.

Poland
Martial law was introduced in Polish People's Republic on December 13, 1981, by General Wojciech Jaruzelski to prevent the extraparliamentary opposition from gaining popularity and political power in the country. Thousands of people linked to the Solidarity Movement, including Lech Wałęsa, were arbitrarily arrested and detained. Approximately 91 deaths are attributed to the martial law, including 9 miners shot by the police force during the pacification of striking Wujek Coal Mine. Curfews, censorship and food rationing were in place. A nationwide travel ban was imposed. The martial law was eventually lifted July 22, 1983. Contemporary Polish society is divided in opinion on the necessity of introducing martial law in 1981. It is viewed by some as a lesser evil that was necessary to stop a potential Soviet military intervention as the Warsaw Pact, which Poland signed in 1955, enabled other Eastern Bloc countries to intervene if they believed that communism was in danger.

Russian Federation
In the Russian Federation recourse to martial law is governed by a document passed 30 January 2002 as No. 1-FKZ (1-ФКЗ).

South Korea
In October 1946, United States Army Military Government in Korea declared martial law as a result of the Daegu Riot.
On November 17, 1948, President Syngman Rhee regime proclaimed a martial law in order to quell the Jeju Uprising.
On April 19, 1960, Syngman Rhee government proclaimed a martial law in order to suppress the April Revolution.

Switzerland
There are no provisions for martial law as such in Switzerland. Under the Army Law of 1995, the Army can be called upon by cantonal (state) authorities for assistance (Assistenzdienst). This regularly happens in the case of natural disasters or special protection requirements (e.g., for the World Economic Forum in Davos). This assistance generally requires parliamentary authorization, though, and takes place in the regular legal framework and under the civilian leadership of the cantonal authorities. On the other hand, the federal authorities are authorized to use the Army to enforce law and order when the Cantons no longer can or want to do so (Ordnungsdienst). With this came many significant points of reference. This power largely fell into disuse after World War II.

Syria
The martial law regime between the 1963 Syrian coup d'état and 2011 is the longest ranging period of active martial law. Similar to other countries, martial law in Syria was established as a response to the declaration of a State of Emergency. When on March 8, 1963, the Baath Party seized power, the prime minister of Syria, acting as the martial law governor, was granted extraordinary powers through his declaration of a State of Emergency. Syrian laws enabled the martial law governor to place many restrictions on freedoms of individuals, such as with respect to “meetings, residence, travel and passage in specific places or at particular times; to preventatively arrest anyone suspected of endangering public security and order; to authorize investigation of persons and places; and to delegate any person to perform any of these tasks.” However, the state of emergency declaration in Syria remained intact for nearly 50 consecutive years, prompting intervention and commentary from the international community.International bodies declared such an extended state of emergency as against international law. Specifically, it was held to be in violation of the International Covenant on Civil and Political Rights (hereinafter “ICCPR”), which Syria is a party to. Article 4 of the ICCPR “limits the application of emergency laws to a time of ‘public emergency which threatens the life of the nation and the existence of which is officially proclaimed.’ It further stipulates that the state parties to the ICCPR may derogate from their obligations under the treaty only ‘to the extent strictly required by the exigencies of the situation, provided that such measures are not inconsistent with their other obligations under international law.’”In 2000, Syria responded to the allegations from the ICCPR, and countered that it was in compliance with the ICCPR in a report to the United Nations Human Rights Committee. Syria justified this ongoing declaration of emergency through their concerns of ongoing threats of war by Israel.
On July 28, 2005, the United Nations responded: “Nothing with concern that the state of emergency declared some forty years ago is still in force and provides for many derogations in law or practice from the rights guaranteed under articles 9 14, 19, and 22, among others, of the Covenant, without any convincing explanation being given as to the relevance of these derogations to the conflict with Israel and as to the necessity of these derogations to meet the exigencies of the situation claimed to have been created by the conflict.” In further response, Syria reiterated their position that the on-going emergency declaration was due to a continued threat of war on Syria from Israel. Despite ongoing dialogue over a period of years between Syria, the ICCPR, and the United Nations, the declaration remained in effect for the next six years from the 2005 statement made by the United Nations advising of the invalidity of such an extensive state of emergency declaration.Ultimately, after nearly 50 years, in April of 2011, the President Bashar al-Assad ended Syria’s state of emergency, thereby signaling the end of the longest martial law ruling in history. This came as a response to protests demanding freedom from the historically long police rule over Syria.

Taiwan
The second-longest declaration of martial law in history occurred in Taiwan from 1949 to 1987, for a total of 38 consecutive years. Martial law in Taiwan refers to the periods in the history of Taiwan after World War II that are under the control by the Republic of China Armed Forces of the Kuomintang-led Government of the Republic of China regime. This qualified as "the longest imposition of martial law by a regime anywhere in the world" at that time  but has since been surpassed by Syria.

Thailand
Martial law in Thailand derives statutory authority from the Act promulgated by King Vajiravudh following the abortive Palace Revolt of 1912,  entitled "Martial Law, B.E. 2457 (1914)". Many coups have been attempted or succeeded since then, but the Act governing martial law, amended in 1942, 1944, 1959 and 1972,  has remained essentially the same. In January 2004, the Prime Minister of Thailand, Thaksin Shinawatra, declared a state of martial law in the provinces of Pattani, Yala, and Narathiwat in response to the growing South Thailand insurgency. On September 19, 2006, the Royal Thai Armed Forces declared martial law following a bloodless military coup in the Thai capital of Bangkok, declared while Prime Minister Shinawatra was in New York City to address the United Nations General Assembly. General Sonthi Boonyaratglin took the control of the government, and soon after handed the premiership to ex-Army Chief General Surayud. Sonthi himself is Chief of the Administrative Reform Council. At 3 am, on May 20, 2014, following seven months of civil and political unrest, Army Commander-in-Chief Gen. Prayut Chan-ocha,  declared martial law nationwide.

Turkey
Since the foundation of the Republic of Turkey in 1923 the Turkish Armed Forces conducted three coups d'état and announced martial law. First was established following the 1960 Turkish coup d'état which toppled down Democrat Party government and executed its 3 leader. Another martial law was established after 1971 Turkish military memorandum for a short period of time to impose reforms to confront escalated domestic violence, which was not successful. As confrontation between far-left and far-right groups grew, martial law is established in 1978 and 1980 Turkish coup d'état followed afterwards that kept in place until 1983. The Martial law between 1978 and 1983 was replaced by a state of emergency in a limited number of provinces that lasted until November 2002. On July 15, 2016, the Peace at Home Council was said to have implied martial law in a broadcast on TRT during the 2016 Turkish coup d'état attempt.

Ukraine
The restrictions from martial law were defined in a 2015 law "On the Legal Regime of Martial Law". The President decides on the declaration of martial law and then Verkhovna Rada must approve it.Martial law was first declared in Ukraine in 2018 and as a response to Russian hostilities. On 26 November 2018, lawmakers in the Verkhovna Rada overwhelmingly backed President Petro Poroshenko's imposition of martial law along Ukraine's coastal regions and those bordering the Russian Federation and Transnistria, an unrecognized breakaway state of Moldova which has Russian troops stationed in its territory, in response to the firing upon and seizure of Ukrainian naval ships by Russia near the Crimean Peninsula a day earlier. A total of 276 lawmakers in Kyiv backed the measure, which took effect on 28 November 2018 and automatically expired in 30 days.This period of martial law was both intended to be, and ultimately was, limited in scope. At that time, the current president of Ukraine, President Poroshenko, proposed a 60-day martial law period, but ultimately a 30-day period of martial law was signed into effect. This period of martial law came to an end at its scheduled 30-day mark. This declaration was limited to specific areas of Ukraine, including territories along the Russia-Ukraine border, the Moldova-Ukraine border, the coasts of the Black Sea, the Sea of Azov, and the Azov – Kerch international waters.On 24 February 2022, President Volodymyr Zelensky declared martial law following the Russian invasion of Ukraine. Then, on March 15, 2022, the Parliament of Ukraine adopted the Law of Ukraine “On Organizing Labor Relations under Martial Law” which came into effect on March 24, 2022, and “clarified relevant restrictions of the constitutional right and freedoms and set out special rules applicable to labor relations to replace the ‘normal’ rules of the Labour Code of Ukraine.” Article 4(7) of the Law of Ukraine holds that the “General Staff of the Armed Forces of Ukraine shall direct, coordinate and control the activities of regional military administrations on defense, public safety, and order, and implement measures of martial law. The Cabinet of Ministers of Ukraine shall direct, coordinate and control the regional military administrations regarding other issues.” This second martial law declaration occurred on the same day as the 2022 Russian invasion into Ukraine.As of June 2023, the period of martial law is set to end on August 18, 2023.

United States
In the United States martial law has been declared for a state or other locality under various circumstances including after a direct foreign attack (Hawaii after the Japanese attack on Pearl Harbor; New Orleans during the Battle of New Orleans); after a major disaster (Chicago after the Great Chicago Fire of 1871; San Francisco after the earthquake of 1906); and in response to chaos associated with protests and mob action (San Francisco during the 1934 West Coast waterfront strike; Montgomery, Alabama, following the mob actions against the Freedom Riders). It has also been declared by renegade local leaders seeking to avoid arrest or challenges to their authority (Nauvoo, Illinois by Joseph Smith during the Illinois Mormon War and Utah by Governor Brigham Young during the Utah War).The martial law concept in the United States is closely tied with the right of habeas corpus, which is in essence the right to a hearing on lawful imprisonment, or more broadly, the supervision of law enforcement by the judiciary. The ability to suspend habeas corpus is related to the imposition of martial law. Article 1, Section 9 of the U.S. Constitution states, "The Privilege of the Writ of Habeas Corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it."  There have been many instances of the use of the military within the borders of the United States, such as during the Whiskey Rebellion and in the South during the Civil Rights Movement, but these acts are not tantamount to a declaration of martial law.
In United States law, martial law is limited by several court decisions handed down between the American Civil War and World War II. In 1878, Congress passed the Posse Comitatus Act, which, depending on the circumstances, can forbid U.S. military involvement in domestic law enforcement without congressional approval.(18 U.S.C. § 1385, original at 20 Stat. 152)
The legality of the implementation of martial law was examined in 1866, in the court case Ex parte Milligan, 71 U.S. 2 (1866). Through this case, the Supreme Court established that trying civilians in military tribunals was unconstitutional unless there were no civilian courts available. Today, the ability to declare martial law over the United States is not explicitly granted in the Constitution. Despite this, martial law has been declared at least 68 times in the United States.There are two main schools of thought regarding the declaration of martial law. First, some scholars argue that the ability to declare martial law is a constitutional power vested in Congress, and in some cases of emergency, the President. The second school of thought believes that the power to declare martial law in the United States is not expressed in any law, but rather arises as a matter of necessity and in the interests of “national self-preservation.” As it stands today, there is no explicit provision in the Constitution granting powers to any specific body of government to declare martial law.
Historically, martial law has been declared in response to national emergencies in the United States. In Hawaii, for example, martial law was instituted following the attack on Pearl Harbor. The Supreme Court evaluated the legality of declaring martial law in Hawaii in the court case Duncan v. Kahanamoku, 327 U.S. 304 (1946). Here, the Supreme Court held that although Hawaii was not yet a state, the legality of declaring martial law must be analyzed as though Hawaii was one. As a result, the United States determined that the safety of the residents of Hawaii was their responsibility, and martial law was implemented throughout the Hawaiian Islands.

Yugoslavia
During the Yugoslav Wars in 1991, a "State of Direct War Threat" was declared. Although forces from the whole SFRY were included in this conflict, martial law was never announced, but after secession, Croatia and Bosnia and Herzegovina declared martial law. On March 23, 1999, a "State of Direct War Threat" was declared in Yugoslavia, following the possibility of NATO air-strikes. The day after strikes began, martial law was declared, which lasted until June 1999, although strikes ended on June 10, following Kumanovo Treaty.

See also
DEFCON
Gendarmerie
Military rule (disambiguation)
Stratocracy, a form of government headed by military generals.
Police state, state governed through the power of the police force.
Military junta, a government led by a committee of military leaders.
Military dictatorship, a form of autocratic rule led by the military.
Authoritarianism, a form of government with strong central power and limited freedoms.

References
Further reading
Macomb, Alexander, Major General of the United States Army, The Practice of Courts Martial, (New York: Harper & Brothers, 1841) 154 pages.
Macomb, Alexander, Major General of the United States Army, A Treatise on Martial Law, and Courts-Martial as Practiced in the United States. (Charleston: J. Hoff, 1809), republished (New York: Lawbook Exchange, 2007). ISBN 978-1-58477-709-0.
Rehnquist, William H. (1998). All the Laws but One: Civil Liberties in Wartime. New York: William Morrow & Co. ISBN 0-688-05142-1.
The Concise Oxford Dictionary of Politics. Edited by Iain McLean and Alistair McMillan, Oxford University Press, 2004.
Black's Law Dictionary: Definitions of the Terms and Phrases of American and English Jurisprudence, Ancient and Modern. Henry Campbell Black. St. Paul: West Pub. Co., 1979.

External links

'Martial law' in the Encyclopædia Britannica
Martial law in Thailand in 2005
Full text of the 1972 Martial Law in the Philippines
NSPD-51
Emergency Rule of 3 November 2007 Pakistan