Martial law can be used by governments to enforce their rule over the public. 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, 2009’s Iranian Green Movement that led to the takeover by Revolutionary Guards); to suppress political opposition (Poland in 1981); or to stabilize insurrections or perceived insurrections (Canada, The October Crisis of 1970).
The Posse Comitatus Act is a United States federal law ( 18 U.S.C. § 1385, original at 20 Stat. 152) signed on June 18, 1878 by President Rutherford B. Hayes. The purpose of the act – in concert with the Insurrection Act of 1807 – is to limit the powers of the federal government in using federal military personnel to enforce domestic policies within the United States.
“..or in response to chaos associated with protests and mob action,”
Article 1, Section 9 of the US 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.”