2026
Habeas or Something Else? Choosing the Right Vehicle to Challenge Immigration Action
Part 3 of a series on habeas corpus in immigration detention
In Part 1 and Part 2 of this series, we explained what a writ of habeas corpus is and how it can be used to challenge prolonged immigration detention. But habeas is only one tool in the toolbox, and reaching for the wrong one is a costly mistake. A petition filed in the wrong court, or one that asks the wrong kind of court for the wrong kind of relief, can be dismissed on jurisdictional grounds before a judge ever considers the merits, sometimes after months of delay the family could not afford to lose.
This article compares the main vehicles for challenging immigration action in federal court, habeas corpus, the petition for review, mandamus, and the bond process before an immigration judge, and explains what each one is actually for. The unifying theme is simple: the right vehicle depends entirely on what you are trying to challenge.
Start with the right question: what are you actually challenging?
Almost every vehicle-selection mistake traces back to skipping this step. Before asking “how do we go to court,” the threshold question is “what exactly are we trying to change?” The answer usually falls into one of a few categories: the legality of someone’s detention; the validity of a final order of removal; an agency’s failure to act on something it is required to decide; or a request for release on bond during proceedings. Each of those maps to a different vehicle, and they are generally not interchangeable.
Habeas corpus: challenging the legality of custody
As we covered earlier in this series, a habeas petition under 28 U.S.C. § 2241 challenges the legality of detention. It is filed in federal district court and asks whether the government has authority to hold the person in custody as it is doing.
Habeas is the right vehicle when the grievance is about custody itself: detention that has become unreasonably prolonged, detention after a removal order where removal is not foreseeable, or detention that is claimed to be unauthorized or unconstitutional. It is generally not the vehicle for arguing that a removal order was substantively wrong, a point that becomes clear as soon as we look at the next tool.
The petition for review: challenging the removal order itself
If the goal is to challenge the removal order, to argue that the immigration judge or the Board of Immigration Appeals got the law or the facts wrong, habeas is almost never the answer. Congress has channeled that challenge into a different vehicle: the petition for review, filed in a federal court of appeals under 8 U.S.C. § 1252 (Section 242 of the Immigration and Nationality Act).
The statute is emphatic about this. It provides that a petition for review filed in the appropriate court of appeals is the “sole and exclusive means for judicial review of an order of removal,” and it specifically forecloses using habeas corpus, mandamus, or other provisions to get around that channel. This was the central change made by the REAL ID Act of 2005, which eliminated district-court habeas review of final removal orders and routed those challenges to the courts of appeals.
Two practical consequences follow. First, a petition for review generally must be filed within a strict deadline, 30 days from the final order, and that deadline is unforgiving. Second, the court of appeals typically reviews the existing administrative record rather than taking new evidence. So the petition for review is powerful but narrow: it is the correct and only route to attack the removal order, but it is not a mechanism to relitigate the case from scratch.
The key line to hold onto: habeas challenges the detention; the petition for review challenges the removal order. Confusing the two is one of the most common and consequential errors in this area.
Mandamus: forcing the government to act
Sometimes the problem is not that the government did something wrong, but that it has done nothing at all. An application sits for years with no decision; a required step never happens. Here the relevant tool is often a mandamus action under 28 U.S.C. § 1361, sometimes paired with a claim under the Administrative Procedure Act for unlawfully withheld or unreasonably delayed agency action.
Mandamus is a demanding remedy. A plaintiff generally must show a clear right to the relief requested, a clear and non-discretionary duty on the part of the official to act, and the absence of any other adequate remedy. Importantly, mandamus can compel the government to make a decision; it generally cannot compel a particular decision. The agency retains discretion over the outcome, it can approve, deny, or ask for more evidence, but it can be ordered to stop sitting on the case. In practice, many delayed-adjudication cases resolve once the lawsuit forces the agency to act.
Mandamus is therefore the vehicle for unreasonable delay, not for a wrong result and not for unlawful detention. Using it to attack a removal order or to seek release from custody would be aiming the wrong tool at the target.
The bond process: release during proceedings
Finally, not every request for release requires federal-court litigation at all. For many people detained during their removal proceedings, the first and most direct avenue is a bond request before an immigration judge. If the person is eligible for bond, the immigration judge can consider release and set conditions, weighing flight risk and danger to the community. A bond denial can be appealed to the Board of Immigration Appeals.
This matters for vehicle selection in two ways. First, for someone who is bond-eligible, the immigration-court bond process is often faster and more appropriate than a federal habeas petition. Second, certain categories of detention are mandatory, and the immigration judge may lack authority to grant bond at all, which is frequently the very situation that pushes a prolonged-detention case into federal court on a habeas theory, as discussed in Part 2. In other words, the bond process and habeas are not competitors so much as different stages: habeas often becomes relevant precisely when the ordinary bond process is unavailable or has run its course.
Putting it together: a quick map
Although every case is fact-specific, the vehicles sort out along clear lines:
- To challenge the legality of detention → habeas corpus, 28 U.S.C. § 2241, in federal district court.
- To challenge a final order of removal → petition for review, 8 U.S.C. § 1252, in a federal court of appeals, within the deadline.
- To challenge the government’s failure to decide something it must decide → mandamus, 28 U.S.C. § 1361 (often with an APA claim), in federal district court.
- To seek release during proceedings when eligible → a bond request before the immigration judge, appealable to the Board of Immigration Appeals.
The categories can overlap in a single family’s situation. A person might have a pending petition for review challenging a removal order and a habeas petition challenging the length of their detention at the same time, because those are two different grievances with two different remedies. The skill lies in matching each grievance to the vehicle built for it.
Why this matters
Choosing the wrong vehicle is not a harmless technicality. Filing a habeas petition to attack a removal order, or a petition for review to seek release from detention, invites dismissal on jurisdictional grounds and can burn a deadline that cannot be recovered. Because the vehicles carry different courts, different standards, and different filing deadlines, the analysis of which one fits should happen at the very outset, before anything is filed. If you or a family member is facing detention, a removal order, or a stalled application and you are unsure which path applies, our office can help identify the correct vehicle and avoid the procedural pitfalls that derail otherwise strong cases.
Plain English Version
Going to court to fight an immigration problem is not one-size-fits-all. There are different tools for different problems, and using the wrong one can get your case thrown out, sometimes after you have already missed an important deadline.
Here is the short version. If the problem is that someone is being held in detention and you think that is illegal, the tool is usually a habeas petition in federal district court. If the problem is a deportation order you think is wrong, the tool is a petition for review in a federal appeals court, and you generally have only 30 days to file it. If the problem is that the government is sitting on your case and not deciding it, the tool is often a mandamus lawsuit, which can force them to make a decision (though not to make the decision you want). And if you simply want to get out of detention while your case is going on, the first step is often a bond hearing before the immigration judge.
The most common and damaging mix-up is using habeas to fight a deportation order, or using a deportation appeal to try to get out of detention. They are different problems with different solutions. Because the deadlines and courts are different for each, it is worth getting advice early so the right case is filed in the right place, the first time.
Need help? Contact us to navigate the right pathway for your case.
Authorities and further reading
- 28 U.S.C. § 2241, Power to grant writ (habeas corpus) (Cornell Legal Information Institute)
- 8 U.S.C. § 1252, Judicial review of orders of removal (petition for review) (Cornell Legal Information Institute)
- 28 U.S.C. § 1361, Action to compel an officer of the United States to perform his duty (mandamus) (Cornell Legal Information Institute)
- 5 U.S.C. § 706, Scope of review, Administrative Procedure Act (Cornell Legal Information Institute)
- REAL ID Act of 2005, H.R. 418, 109th Congress (Congress.gov)
Disclaimer: This article provides general information and should not be construed as legal advice. For guidance tailored to your specific circumstances, please consult with a qualified immigration attorney.