
646 F.3d 1157 (2011)
Jaime Aldos LEONARDO, Jr., Petitioner-Appellant,
v.
Phillip CRAWFORD, Respondent-Appellee.
No. 09-17495.
United States Court of Appeals, Ninth Circuit.
Argued and Submitted October 4, 2010.
Filed May 3, 2011.
Amended August 3, 2011.
*1158 Jon M. Sands, Federal Public Defender, and J. Ryan Moore (argued), Assistant Federal Public Defender, Tucson, AZ, for the petitioner-appellant.
Dennis K. Burke, United States Attorney, Randall M. Howe, Deputy Appellate Chief, and Cynthia M. Parsons, Assistant U.S. Attorney, Phoenix, AZ, and William H. Orrick, III (argued), U.S. Department of Justice, Washington, D.C., for the respondent-appellee.
Judy Rabinovitz (argued), ACLU Foundation, Immigrants' Rights Project, New York, NY, Ahilan T. Arulanantham, ACLU Foundation of Southern California, Los Angeles, CA, and Jayashri Srikantiah, Stanford Law School, Immigrants' Rights Clinic, Stanford, CA, for amicus curiae American Civil Liberties Union Foundation and American Civil Liberties Foundation of Southern California.
Before: SUSAN P. GRABER, RAYMOND C. FISHER and JAY S. BYBEE, Circuit Judges.[*]

ORDER
The opinion filed May 13, 2011, slip op. 6263, and appearing at 2011 WL 1814706 (9th Cir.2011), is amended as follows:
At slip op. 6270, 2011 WL 1814706, at *2, after see also> and before Puga v. Chertoff, 488 F.3d 812, 815 (9th Cir. 2007)>, insert the following: McCarthy v. Madigan, 503 U.S. 140, 146-49, 112 S.Ct. 1081, 117 L.Ed.2d 291 (1992) (recognizing "at least three broad sets of circumstances in which the interests of the individual weigh heavily against requiring administrative exhaustion"), superseded by statute on other grounds as stated in Booth v. Churner, 532 U.S. 731, 121 S.Ct. 1819, 149 L.Ed.2d 958 (2001);>.
With this amendment, the panel has voted to deny the petition for panel rehearing and the petition for rehearing en banc.
The full court has been advised of the petition for rehearing en banc and no judge has requested a vote on whether to rehear the matter en banc. Fed. R.App. P. 35.
The petition for panel rehearing and the petition for rehearing en banc are DENIED.
No further petitions for rehearing will be entertained.


*1159 OPINION
FISHER, Circuit Judge:
Jaime Aldos Leonardo, Jr. appeals the district court's judgment dismissing his 28 U.S.C. § 2241 habeas petition challenging his prolonged immigration detention without bond. He contends that his bond hearing, provided under Casas-Castrillon v. Department of Homeland Security, 535 F.3d 942 (9th Cir.2008), violated due process. We write to clarify the proper procedure for challenging a Casas-Castrillon bond determination: Once an alien has received a Casas-Castrillon bond hearing before an immigration judge (IJ), he may appeal the IJ's decision to the Board of Immigration Appeals (BIA). If the alien is dissatisfied with the BIA's decision, he may then file a habeas petition in the district court, challenging his continued detention. The district court's decision on the habeas petition may be appealed to this court. Because Leonardo did not follow this course here, and thus did not exhaust administrative remedies before pursuing habeas relief, we remand to the district court with instructions to dismiss his petition without prejudice.

BACKGROUND
Leonardo filed a pro se petition for writ of habeas corpus in federal district court, alleging that his prolonged detention was unlawful. While Leonardo's habeas petition was pending, we decided Casas-Castrillon and Prieto-Romero v. Clark, 534 F.3d 1053 (9th Cir.2008), which held that procedural due process entitles aliens detained under 8 U.S.C. § 1226(a), pending completion of their removal proceedings, to a bond hearing before an immigration judge to determine whether their ongoing detention is justified. In light of those decisions, the district court ordered the government to afford Leonardo a Casas-Castrillon hearing. The court ordered "that the Court will grant Petitioner's Petition for Writ of Habeas Corpus and order Respondent to release Petitioner, unless Respondent complies with this Court's Order and notifies the Court by August 28, 2009." Order June 29, 2009, at 5. The government afforded Leonardo a Casas-Castrillon hearing before an immigration judge, and the IJ denied bond, concluding that Leonardo posed a danger to the community.
Rather than appealing the IJ's adverse bond determination to the BIA, Leonardo filed a motion for review of the IJ's decision in his pending habeas case, arguing that the hearing failed to satisfy due process or conform to the district court's previous order. The district court denied the petition. First, the court concluded that the government had "complied exactly with this Court's Order" by providing Leonardo a bond hearing before an immigration judge. Order Oct. 13, 2009, at 3. Second, the court concluded that it lacked jurisdiction to consider Leonardo's claims that the hearing lacked due process, citing 8 U.S.C. § 1226(e), which provides that "[n]o court may set aside any action or decision by the Attorney General under this section regarding the detention or release of any alien or the grant, revocation, or denial of bond." 8 U.S.C. § 1226(e). The court therefore denied the petition and entered judgment dismissing the action. The court advised Leonardo that his "only recourse [wa]s to appeal the bond determination to the Board of Immigration Appeals." Order Oct. 13, 2009, at 4. Leonardo timely appealed the district court's judgment to this court.
Leonardo also ultimately appealed the IJ's adverse bond determination to the BIA. The BIA reviewed the IJ's determination de novo, affirmed the IJ's conclusion that Leonardo posed a danger to the community and dismissed the appeal. See In re Leonardo, No. A040-464-700 (B.I.A. *1160 Apr. 28, 2010). We take judicial notice of the BIA's decision. See Fed.R.Evid. 201.

DISCUSSION

I.
The district court concluded that 8 U.S.C. § 1226(e) deprives a district court of jurisdiction to review a Casas-Castrillon bond determination for constitutional and legal error. This conclusion was incorrect. It is now clear that "a federal district court has habeas jurisdiction under 28 U.S.C. § 2241 to review Casas-Castrillon bond hearing determinations for constitutional claims and legal error." V. Singh v. Holder, 638 F.3d 1196, 1200-01 (9th Cir.2011). "Although § 1226(e) restricts jurisdiction in the federal courts in some respects, it does not limit habeas jurisdiction over constitutional claims or questions of law." Id. at 1202. The district court therefore should not have denied Leonardo's habeas petition for lack of jurisdiction.

II.
We agree with the government, however, that the district court should have dismissed Leonardo's claims, without prejudice, for a failure to exhaust administrative remedies.
We held in Casas-Castrillon that aliens who are held in custody under 8 U.S.C. § 1226(a), while their petitions for review of their removal orders are pending, are entitled to a bond hearing before an immigration judge. See Casas-Castrillon, 535 F.3d at 951. If they are dissatisfied with the IJ's bond determination, they may file an administrative appeal so that "the necessity of detention can be reviewed by . . . the BIA." Prieto-Romero, 534 F.3d at 1059. If they remain dissatisfied, they may file a petition for habeas corpus in the district court. See V. Singh, 638 F.3d at 1200-03. They may then appeal to this court.
Here, Leonardo pursued habeas review of the IJ's adverse bond determination before appealing to the BIA. This short cut was improper. Leonardo should have exhausted administrative remedies by appealing to the BIA before asking the federal district court to review the IJ's decision. See Rojas-Garcia v. Ashcroft, 339 F.3d 814, 819 (9th Cir.2003) (a petitioner "must exhaust administrative remedies before raising . . . constitutional claims in a habeas petition when those claims are reviewable by the BIA on appeal"). Once the BIA rendered its decision, Leonardo could have properly pursued habeas relief in the district court and the district court's decision would have been subject to review in this court.
When a petitioner does not exhaust administrative remedies, a district court ordinarily should either dismiss the petition without prejudice or stay the proceedings until the petitioner has exhausted remedies, unless exhaustion is excused. See Morrison-Knudsen Co. v. CHG Int'l, Inc., 811 F.2d 1209, 1223 (9th Cir.1987) (when confronted by an unexcused failure to exhaust administrative remedies, a district court "may dismiss the action pending exhaustion of administrative remedies, or it may stay its own proceedings pending administrative review"); see also McCarthy v. Madigan, 503 U.S. 140, 146-49, 112 S.Ct. 1081, 117 L.Ed.2d 291 (1992) (recognizing "at least three broad sets of circumstances in which the interests of the individual weigh heavily against requiring administrative exhaustion"), superseded by statute on other grounds as stated in Booth v. Churner, 532 U.S. 731, 121 S.Ct. 1819, 149 L.Ed.2d 958 (2001); Puga v. Chertoff, 488 F.3d 812, 815 (9th Cir.2007) (identifying factors a court should consider when deciding whether to excuse the prudential exhaustion requirement in a particular case). Here, Leonardo has not asked *1161 for a stay. Nor has he demonstrated grounds for excusing the exhaustion requirement. We accordingly remand to the district court with instructions to dismiss Leonardo's petition without prejudice. To the extent Leonardo has now exhausted his administrative remedies, he may file a new habeas action in district court challenging the BIA's decision denying bond. We express no opinion on the merits of any claims he may raise.

III.
We reject Leonardo's contention that the district court should have addressed his challenges to the IJ's decision based on the court's authority to ensure compliance with its earlier habeas order. Leonardo is correct that the district court had authority to review compliance with its earlier order conditionally granting habeas relief. See Gentry v. Deuth, 456 F.3d 687, 692 (6th Cir.2006) (holding that a federal district court retains jurisdiction to determine whether a party has complied with the terms of a conditional order in a habeas case); Phifer v. Warden, U.S. Penitentiary, 53 F.3d 859, 865 (7th Cir. 1995) ("When a habeas petitioner alleges noncompliance with a conditional order, jurisdiction exists for the purpose of determining whether the [government] acted in accordance with the court's mandate."); cf. Hamilton v. Nakai, 453 F.2d 152, 157 (9th Cir.1972) ("The equitable jurisdiction of a federal court extends to supplemental or ancillary bills brought for the purpose of effectuating a decree of the same court."). But in this case the district court concluded that the government "complied exactly with this Court's Order" by affording a bond hearing before an immigration judge. The district court thus exercised its authority to ensure compliance with its conditional grant of relief and construed Leonardo's legal challenges following the IJ's hearing as raising new arguments not covered by the earlier order. The district court was under no obligation to address Leonardo's new arguments under the ambit of ensuring compliance with the earlier order.

CONCLUSION
The judgment of the district court is vacated, and the case is remanded with instructions to dismiss Leonardo's petition without prejudice. The government's motion to supplement the record on appeal, filed May 21, 2010, is granted. Each party shall bear its own costs on appeal.
VACATED AND REMANDED.
NOTES
[*]  Judge Graber was drawn to replace Judge Cynthia Holcomb Hall on the panel following Judge Hall's untimely death. Judge Graber has read the briefs, reviewed the record and listened to the tape of oral argument.
