The United States Congress granted all federal courts jurisdiction under 28 U.S.C. § 2241 to issue writs of habeas corpus to release prisoners held by any government entity within the country from custody in the following circumstances:
* Is in custody under or by color of the authority of the United States or is committed for trial before some court thereof; or
* Is in custody for an act done or omitted in pursuance of an Act of Congress, or an order, process, judgment or decree of a court or judge of the United States; or
* Is in custody in violation of the Constitution or laws or treaties of the United States; or
* Being a citizen of a foreign state and domiciled therein is in custody for an act done or omitted under any alleged right, title, authority, privilege, protection, or exemption claimed under the commission, order or sanction of any foreign state, or under color thereof, the validity and effect of which depend upon the law of nations; or
* It is necessary to bring said persons into court to testify or for trial.