U.S. Constitution, Article I — The Legislative Branch, Section 9, Clause 2
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.
Notes
Bars suspension of the privilege of the writ of habeas corpus, with one exception: when, in cases of rebellion or invasion, the public safety may require it. Outside rebellion or invasion, the text allows no suspension of this writ, which tests whether a person's detention is lawful.
Use as reference
Lexinter.net | U.S. Const. art. I, § 9, cl. 2 | https://laws.lexinter.net/constitution/us/article-1/section-9/clause-2