                            PUBLISHED

UNITED STATES COURT OF APPEALS
                FOR THE FOURTH CIRCUIT


OLGENS DRAGENICE,                     
              Petitioner-Appellant,
                 v.
                                                  No. 03-6717
TOM RIDGE, Secretary of the
Department of Homeland Security,
              Respondent-Appellee.
                                      
           Appeal from the United States District Court
            for the District of Maryland, at Baltimore.
                Catherine C. Blake, District Judge.
                         (CA-03-570-CCB)

                      Argued: September 28, 2004

                      Decided: November 5, 2004

  Before NIEMEYER, TRAXLER, and SHEDD, Circuit Judges.



Reversed and remanded by published opinion. Judge Niemeyer wrote
the opinion, in which Judge Traxler and Judge Shedd joined.


                             COUNSEL

ARGUED: Brian Eugene Bowcut, ARNOLD & PORTER, L.L.P.,
Washington, D.C., for Petitioner. Bryan Stuart Beier, UNITED
STATES DEPARTMENT OF JUSTICE, Office of Immigration Liti-
gation, Washington, D.C., for Respondent. ON BRIEF: Robert S.
Litt, Emily N. Glatfelter, ARNOLD & PORTER, L.L.P., Washington,
D.C., for Petitioner. Peter D. Keisler, Assistant Attorney General,
2                         DRAGENICE v. RIDGE
Civil Division, M. Jocelyn Lopez Wright, Assistant Director, Michele
Y. F. Sarko, Attorney, UNITED STATES DEPARTMENT OF JUS-
TICE, Office of Immigration Litigation, Washington, D.C., for
Respondent.


                              OPINION

NIEMEYER, Circuit Judge:

   Olgens Dragenice, a native and citizen of Haiti who is being
detained by the Secretary of Homeland Security for removal to Haiti
pursuant to a final order of the Board of Immigration Appeals, chal-
lenges this court’s jurisdiction to decide his petition for a writ of
habeas corpus. Dragenice filed his petition in the district court, and
that court transferred it to this court under 28 U.S.C. § 1631. Alterna-
tively, Dragenice urges this court to convert his habeas petition,
which asserts that he is a national of the United States and therefore
not deportable, into a petition under 8 U.S.C. § 1252(a)(1) for review
of the Board of Immigration Appeals’ final order of removal.

   Section 1631 of Title 28, under which the district court transferred
Dragenice’s habeas petition to this court, requires that the district
court find, among other things, (1) that it lacks jurisdiction and (2)
that this court is one in which the habeas petition could originally
have been filed. Because neither requirement is satisfied in this case,
we reverse the order of transfer and remand Dragenice’s habeas peti-
tion to the district court for further proceedings.

                                   I

   Dragenice entered the United States on April 12, 1996, as a lawful
permanent resident. Four years later, he was convicted in Maryland
state court of robbery with a dangerous and deadly weapon, theft
involving an amount under $300, and second degree assault. The
Maryland court sentenced Dragenice to three years’ imprisonment.

   Following his convictions, the Immigration and Naturalization Ser-
vice, now the Department of Homeland Security ("DHS"), served
                          DRAGENICE v. RIDGE                            3
Dragenice with a "Notice to Appear," charging that he is subject to
removal from the United States under 8 U.S.C. § 1227(a)(2)(A)(i)
because he is an alien convicted of a qualifying crime involving moral
turpitude; under 8 U.S.C. § 1227(a)(2)(A)(iii) because he is an alien
convicted of an aggravated felony; and under 8 U.S.C.
§ 1227(a)(2)(C) because he is an alien convicted of a firearms
offense. In the Notice to Appear, the DHS alleged that Dragenice was
"not a citizen or national of the United States" and that he was "a
native of Haiti and a citizen of Haiti."

   During the course of three hearings, the Immigration Judge deter-
mined that Dragenice was deportable based on the facts admitted by
him. Dragenice testified, however, that he feared being returned to
Haiti because he would be tortured and incarcerated on an indefinite
basis because, among other things, he had committed crimes in the
United States. The Immigration Judge invited Dragenice to file an
application for withholding of removal and for relief under the Con-
vention Against Torture, which Dragenice filed in December 2001. In
his application, Dragenice filled in the box for "Present Nationality
(Citizenship)," stating that he was "Haitian," and in the box for "Na-
tionality at Birth," stating that he was "Haitian." He also stated as part
of his employment history that he was in the "U.S. Army Reserve,
Walter Reed Medical Center" from March 1999 to September 2000.

   Following a fourth hearing before the Immigration Judge, during
which Dragenice agreed that he was a native and citizen of Haiti and
that he was not a citizen of the United States, the Immigration Judge
found, in a written opinion, that Dragenice did not dispute the factual
allegations about his nationality and citizenship contained in the
DHS’ Notice to Appear. Based on the admitted facts in this case, the
Immigration Judge denied Dragenice’s application for removal and
for relief under the Convention Against Torture, ordering that he be
"removed and deported to Haiti."

   Dragenice filed a timely appeal to the Board of Immigration
Appeals ("BIA"), alleging as his reason for appeal that the Immigra-
tion Judge failed "cautiously" to analyze the evidence which estab-
lished a "likelihood of torture at the hands of government officials
upon [his] return to Haiti." In his brief in support of his appeal, filed
six months after his notice of appeal, Dragenice raised for the first
4                             DRAGENICE v. RIDGE
time the additional argument that he was a "national of the United
States" and therefore not subject to deportation even if he had com-
mitted an aggravated felony. He argued that because he swore alle-
giance to the United States to become a member of the U.S. Army
Reserve — in the form specified in 10 U.S.C. § 5021 — he is a
national of the United States.

   Before the BIA ruled on Dragenice’s appeal, Dragenice filed a peti-
tion in the district court for a writ of habeas corpus under 28 U.S.C.
§ 2241. In his petition he alleged that he was being detained in a
"local jail or detention center" by the Attorney General of the United
States (now the Secretary of Homeland Security) pending deportation
from the United States and that his detention for deportation was
unlawful because he was not an alien, as described in 8 U.S.C.
§ 1227. Rather, as he alleged, he was a national of the United States,
having voluntarily enlisted in the U.S. Army Reserve and taken an
oath of allegiance to the United States for that purpose. He stated that
he was still a member of the U.S. Army Reserve and has not been dis-
charged from his "sworn duty." The Secretary filed a motion to dis-
miss Dragenice’s habeas petition, contending that Dragenice had not
exhausted his administrative remedies and that the district court did
not, in any event, have jurisdiction to determine an issue of national-
ity in the context of a removal proceeding, citing 8 U.S.C.
§ 1252(b)(5), which provides that such nationality claims may be
reviewed in the first instance only by the courts of appeals. The dis-
trict court agreed with the Secretary, concluding that review of Drage-
    1
     Section 502 of Title 10 provides:
           Each person enlisting in an armed force shall take the follow-
        ing oath:
            "I, ____________, do solemnly swear (or affirm) that I will
            support and defend the Constitution of the United States
            against all enemies, foreign and domestic; that I will bear
            true faith and allegiance to the same; and that I will obey the
            orders of the President of the United States and the orders of
            the officers appointed over me, according to regulations and
            the Uniform Code of Military Justice. So help me God."
        This oath may be taken before any commissioned officer of any
        armed force.
                          DRAGENICE v. RIDGE                           5
nice’s nationality claim in the context of his removal order must
receive initial review in a court of appeals. Rather than dismissing
Dragenice’s habeas petition, however, the district court elected to
transfer the case to this court under the authority of 28 U.S.C. § 1631.

   After Dragenice’s habeas petition was transferred to this court, the
BIA entered an order dated April 30, 2003, affirming without opinion
the decision of the Immigration Judge and declaring it to be "the final
agency determination." After Dragenice filed a motion to reopen and
reconsider, the BIA entered a second order dated October 17, 2003,
denying Dragenice’s motion. In its second order, the BIA stated:

    The respondent also again argues that he is a national of the
    United States. The respondent has not presented an error in
    our previous decision regarding this issue. Moreover, even
    considering the respondent’s arguments in his motion to
    reconsider, he has not established that he acquired United
    States nationality under the means provided by the Immigra-
    tion and Nationality Act.

   Dragenice did not appeal either of the BIA’s orders by filing a peti-
tion for review in this court as provided by 8 U.S.C. § 1252. This
court thus has before it only Dragenice’s petition for habeas corpus
filed in the district court and transferred to this court.

                                   II

   Dragenice contends that the district court improperly applied 28
U.S.C. § 1631 to transfer his § 2241 habeas petition to this court
because the district court erroneously concluded that it did not have
jurisdiction over his petition. He argues, relying on INS v. St. Cyr, 533
U.S. 289 (2001), that the district court misconstrued 8 U.S.C.
§ 1252(b)(5) in holding that that provision eliminated the district
court’s general habeas jurisdiction when the habeas claim involves
the issue of nationality. Alternatively, Dragenice urges us to treat his
habeas petition, as now lodged in this court, as a petition under 8
U.S.C. § 1252(a)(1) for direct review of the DHS’ removal order,
which was entered after he filed his habeas petition in the district
court.
6                          DRAGENICE v. RIDGE
   The Secretary agrees that we are without jurisdiction, but the Sec-
retary argues that a petition for review of the BIA’s determination of
Dragenice’s nationality must be obtained by filing a direct petition for
review in this court under 8 U.S.C. § 1252(a)(1) within 30 days of the
DHS’ final order of removal. The Secretary notes that Dragenice
never filed a petition for review, electing rather to file his habeas peti-
tion before his DHS proceedings had been exhausted. Thus, the Sec-
retary summarizes:

     [A]t the time that he filed his district court petition, he was
     not yet subject to a final order of removal which this Court
     could have reviewed. Hence, this Court should find it lacks
     jurisdiction over this case because the habeas petition chal-
     lenging petitioner’s removal proceedings based on his
     nationality claim was prematurely filed because petitioner
     had not then exhausted his administrative remedies.

        Furthermore, even if petitioner could have somehow
     cured his untimely filed habeas petition by subsequently
     moving to amend it within the 30 days after the Board’s
     decision was filed to include review of that decision, he
     failed to do so. Nor did he file an independent timely peti-
     tion for review of either the Board’s final removal orders of
     April 30, 2003, or October 17, 2003.

   Alternatively, the Secretary contends that the Immigration and
Nationality Act ("INA"), as amended by the Antiterrorism and Effec-
tive Death Penalty Act of 1996 ("AEDPA") and the Illegal Immigra-
tion Reform and Immigrant Responsibility Act of 1996 ("IIRIRA"),
"explicitly provides that a petitioner may have his nationality claim
‘decided only as provided’ in . . . 8 U.S.C. § 1252(b)(5)(C)" and that
a "petitioner’s nationality claim has to be brought in the Court of
Appeals in the first instance." Even though § 1252(a)(2)(C) denies an
alien the right of review when the alien is being removed on the
ground of having been convicted of certain crimes and the court of
appeals therefore would lack jurisdiction to review his petition, the
Secretary contends that we would have jurisdiction to review Drage-
nice’s nationality claim because we would have to determine our own
jurisdiction in the first instance. In this case, the Secretary concedes,
                              DRAGENICE v. RIDGE                                7
we would ultimately have to dismiss the petition for review under
§ 1252(a)(2)(C).

   We thus have the unusual circumstance in which both parties claim
that the district court erred in applying 28 U.S.C. § 1631 to transfer
Dragenice’s habeas petition to this court, but they rely on different
rationales. Dragenice maintains that the transfer was improper
because the district court had habeas jurisdiction, and the government
maintains transfer was improper because this court lacks jurisdiction
for procedural reasons.

   Section 1631 provides that whenever a district court finds that it is
without jurisdiction over an action, it must, "if it is in the interest of
justice," transfer the action before it to any other district court or court
of appeals "in which the action . . . could have been brought." Thus,
if the district court were to find a transfer in the interest of justice, it
would have to conclude that (1) it was without jurisdiction and (2) the
transferee court was a court in which the action could have originally
been brought. See 28 U.S.C. § 1631.2

   We begin with the question of whether the district court had juris-
diction over Dragenice’s habeas claim brought under 28 U.S.C.
§ 2241. Dragenice alleged that the Secretary was detaining him in
Maryland in a local detention center pending deportation and that his
detention was "unlawful," explaining that because he took the oath of
office to enter the U.S. Army Reserve, swearing allegiance to the
United States, he was a "‘national’ of the United States" and that
  2
   Section 1631 of Title 28 provides:
         Whenever a civil action is filed in a court as defined in section
      610 of this title or an appeal, including a petition for review of
      administrative action, is noticed for or filed with such a court and
      that court finds that there is a want of jurisdiction, the court shall,
      if it is in the interest of justice, transfer such action or appeal to
      any other such court in which the action or appeal could have
      been brought at the time it was filed or noticed, and the action
      or appeal shall proceed as if it had been filed in or noticed for
      the court to which it is transferred on the date upon which it was
      actually filed in or noticed for the court from which it is trans-
      ferred.
8                         DRAGENICE v. RIDGE
"only aliens can be removed." He concluded his petition by stating
that the DHS "lacks authority to deport petitioner because he is a
national of the United States and because they cannot deport a mem-
ber of the United States military," and he demanded "immediate
release from detention."

   The district court concluded that it was without jurisdiction to
entertain Dragenice’s petition because its resolution would involve
determining Dragenice’s nationality in the context of a removal order,
an issue committed in the first instance to the courts of appeals by 8
U.S.C. § 1252(b)(5). By implication, the district court held that the
INA as amended in 1996 by the AEDPA, Pub. L. No. 104-132, 110
Stat. 1214, and IIRIRA, Pub. L. No. 104-208, 110 Stat. 3009, stripped
the district court of jurisdiction to decide such a question.

   Habeas jurisdiction is conferred on district courts by 28 U.S.C.
§ 2241, and the jurisdictional prerequisite is the filing of an applica-
tion in which the petitioner claims that he is being detained unlaw-
fully in the jurisdiction of the district court. The district court’s
jurisdiction on habeas is "independent" of related proceedings, Fay v.
Noia, 372 U.S. 391, 422-24, 423 n.32 (1963), and "[t]he jurisdictional
prerequisite is . . . detention simpliciter," id. at 430; see also Preiser
v. Rodriguez, 411 U.S. 475, 484 (1973) (noting that "the essence of
habeas corpus is an attack by a person in custody upon the legality
of that custody" and that the "function of the writ is to secure release
from illegal custody").

   But this is not to say that because a district court has habeas juris-
diction it must reach the merits of an alleged unlawful detention and
may not apply judicially created restraints. For example, at the point
in time when the district court was considering Dragenice’s petition,
Dragenice was party to an administrative proceeding that would
address the very issue he was raising collaterally in his habeas peti-
tion. That alone would have entitled the district court to dismiss his
petition as premature and not exhausted. See, e.g., Braden v. 30th
Judicial Cir. Ct. of Ky., 410 U.S. 484, 489 (1973) (noting that "habeas
corpus does not lie, absent ‘special circumstances,’ to adjudicate the
merits of an affirmative defense to a state criminal charge prior to a
judgment of conviction" (emphasis added) (quoting Ex parte Royall,
117 U.S. 241, 253 (1886))). Similarly, if the petitioner had lost previ-
                          DRAGENICE v. RIDGE                           9
ously on the issue presented in the habeas proceeding or had failed
to avail himself of the process afforded to him in the earlier proceed-
ing to have the issue decided, habeas would not lie to review the prior
judgment. When a petitioner has had "a fair opportunity to present his
federal claims to a federal forum" some binding effect is appropriate
to preclude "a series of endless postconviction collateral attacks. . . .
For this reason, we have long and consistently affirmed that a collat-
eral challenge [by a habeas proceeding] may not do service for an
appeal." United States v. Frady, 456 U.S. 152, 164-65 (1982). These
and other similar defenses requiring dismissal, however, are not juris-
dictional. See, e.g., Bousley v. United States, 523 U.S. 614, 621
(1998) (noting that the doctrine of procedural default is a "procedural
hurdle" to considering the merits of a habeas petition); Strickland v.
Washington, 466 U.S. 668, 684 (1984) (noting that "the exhaustion
rule requiring dismissal . . . is not jurisdictional"); Fay, 372 U.S. at
425-26 (same).

   In this case, Dragenice alleged the prerequisites for the district
court’s jurisdiction over his application — that he was being unlaw-
fully detained within the district of Maryland. Accordingly, unless
some other statute deprived the district court of jurisdiction to con-
sider Dragenice’s habeas petition, the court had the power to entertain
the petition in the first instance and dispose of it.

   The district court apparently did believe that another statute
deprived it of habeas jurisdiction, concluding that the INA, in effect,
stripped the district court of habeas jurisdiction because the habeas
claim involved a "nationality claim[ ] in the context of [a] removal
order[ ]," which 8 U.S.C. § 1252(b)(5) channeled in the first instance
to the courts of appeals. This conclusion, however, misapprehends the
Supreme Court’s holding in INS v. St. Cyr, 533 U.S. 289 (2001),
which addressed the issue of whether the INA stripped district courts
of habeas jurisdiction.

   In St. Cyr, the Supreme Court rejected the INS’ contention that the
1996 amendments to the INA, 8 U.S.C. §§ 1252(a)(1), 1252(a)(2)(C),
and 1252(b)(9), "stripped the courts of [habeas] jurisdiction" to con-
sider a discrete question of law relating to a petitioner’s removal. 533
U.S. at 298. As the Supreme Court observed, before the 1996 amend-
ments, district courts had authority to decide such a habeas petition,
10                        DRAGENICE v. RIDGE
and any construction of the statutes to withdraw that authority would
raise "a serious Suspension Clause issue." Id. at 305. Indeed, "[t]he
writ of habeas corpus has always been available to review the legality
of Executive detention." Id. Acknowledging that Congress provided
for consolidation under 8 U.S.C. § 1252(b) of avenues for "judicial
review" of removal orders in the courts of appeals, the Court distin-
guished "judicial review" from habeas jurisdiction to imply that the
distinction between the two, coupled with the INA’s insufficient clar-
ity to bar habeas jurisdiction, might leave habeas jurisdiction as it had
been exercised before the 1996 amendments to the INA. See id. at
311-13. But the Court did not specifically resolve whether a statutory
scheme providing judicial review in the courts of appeals could bar
habeas jurisdiction when such review is available. In St. Cyr, the peti-
tioner was denied such judicial review under § 1252(a)(2)(C) because
he had been convicted of drug trafficking, a qualifying crime. Accord-
ingly, the Supreme Court held:

     If it were clear that the question of law could be answered
     in another judicial forum, it might be permissible to accept
     the INS’ reading of § 1252. But the absence of such a
     forum, coupled with the lack of a clear, unambiguous, and
     express statement of congressional intent to preclude judi-
     cial consideration on habeas of such an important question
     of law, strongly counsels against adopting a construction
     that would raise serious constitutional questions. Accord-
     ingly, we conclude that habeas jurisdiction under § 2241
     was not repealed by the [1996 amendments made] by
     AEDPA and IIRIRA.

Id. at 314 (footnote and citation omitted) (emphasis added).

   The district court in this case sought to distinguish St. Cyr based
on the St. Cyr Court’s statement that § 1252(b)(9) "by its own terms
does not bar habeas jurisdiction over removal orders not subject to
judicial review under § 1252(a)(1)" (emphasis in original) (quoting St.
Cyr, 533 U.S. at 313) (internal quotation marks omitted). Taking that
quotation to suggest that when the INA does provide access to a judi-
cial forum through direct review, habeas jurisdiction might be barred,
the district court concluded that § 1252(b)(5) barred habeas jurisdic-
tion in this case. In doing so, the court failed to recognize that Drage-
                          DRAGENICE v. RIDGE                           11
nice likely does not have access to judicial review under § 1252(b)(5),
just as the petitioner did not in St. Cyr, because Dragenice’s deporta-
tion is grounded on his commission of a qualifying crime. See 8
U.S.C. § 1252(a)(2)(C) ("Notwithstanding any other provision of law,
no court shall have jurisdiction to review any final order of removal
against an alien who is removable by reason of having committed a
[qualifying] criminal offense").

   The Secretary argues, despite the limitation contained in
§ 1252(a)(2)(C), that Dragenice did have access to judicial review.
Specifically, the Secretary contends, by channeling the resolution of
nationality issues to the courts of appeals, sections 1252(a)(1) and
1252(b)(5) give the courts of appeals jurisdiction in the first instance
over all nationality claims and that it is then that the courts of appeals
decide their own jurisdiction under § 1252(a)(2)(C). But surely, had
Dragenice filed a petition for review from the DHS’ final order of
removal, we would have been required to deny that we have jurisdic-
tion to review that order in view of the limitation contained in
§ 1252(a)(2)(C). See Ramtulla v. Ashcroft, 301 F.3d 202, 203 (4th
Cir. 2002) (observing that under § 1252(a)(2)(C), we have jurisdiction
"only to review factual determinations that trigger the jurisdiction-
stripping provision" (citing Calcano-Martinez v. INS, 533 U.S. 348,
350 n.2 (2001))). Although that process would enable us to decide the
jurisdictional issue, it would not have enabled us to decide Drage-
nice’s nationality claim. Because § 1252(a)(2)(C) denies judicial
review when the alien has committed a qualifying crime, there is no
other judicial forum to review his nationality claim, and habeas
review must remain available. See Calcano-Martinez, 533 U.S. at
351; Olatunji v. Ashcroft, ___ F.3d ___, No. 00-6650, slip op. at 3-6
(4th Cir. October 19, 2004).

   Accordingly, we conclude that the district court erred in finding
that it did not have habeas jurisdiction as a basis to transfer Drage-
nice’s habeas petition to this court under 28 U.S.C. § 1631.

                                   III

  The transfer statute also requires that the transferee court — in this
case this court — is a court in which the habeas petition could have
been brought at the time it was filed. 28 U.S.C. § 1631. Although nei-
12                        DRAGENICE v. RIDGE
ther party challenges the jurisdiction of this court to entertain a habeas
petition, we nonetheless conclude, sua sponte, that a habeas petition
could not have been filed in this court and that § 1631 was not ful-
filled also for this reason.

   Section 2241 of Title 28, on which Dragenice relied to file his
habeas petition, does not confer authority on this court to entertain his
petition. Although the statute confers habeas jurisdiction on "the
Supreme Court" and "the district courts," it does not similarly confer
jurisdiction on "courts of appeals." Rather it confers jurisdiction on
"any circuit judge within their respective jurisdictions." 28 U.S.C.
§ 2241(a) (emphasis added). This statutory language has uniformly
been construed to mean that, while a single circuit judge may enter-
tain a habeas petition, courts of appeals may not. See, e.g., Matter of
Mackin, 668 F.2d 122, 137 (2d Cir. 1981); Parker v. Sigler, 419 F.2d
827, 828 (8th Cir. 1969); Hodge v. Markley, 339 F.2d 1013, 1014 (7th
Cir. 1965).

   Accordingly, the requirement of § 1631 that a case be transferred
to a court in which it could have been brought is not satisfied in this
case, and we have no jurisdiction over Dragenice’s habeas petition for
any other purpose, including Dragenice’s request that we convert his
habeas petition to a petition for review of the DHS’ removal order.

                                   IV

   For the reasons given, we reverse the district court’s transfer order
and remand Dragenice’s habeas petition to the district court for fur-
ther proceedings.

                                        REVERSED AND REMANDED
