
    Andrew John YELLOWBEAR, Jr., Petitioner-Appellant, v. WYOMING ATTORNEY GENERAL; and Skip Hornecker, in his official capacity as Fremont County Sheriff, Respondents-Appellees.
    No. 06-8064.
    United States Court of Appeals, Tenth Circuit.
    March 21, 2008.
    
      Barry A. Bachrach of Law Office of Barry Bachrach, Leicester, MA, for Petitioner-Appellant.
    David L. Delicath, Senior Assistant Attorney General (Patrick J. Crank, Attorney General, with him on the brief), of Office of Attorney General, State of Wyoming, Cheyenne, WY, for Respondents-Appellees.
    Before HENRY, Chief Judge, SEYMOUR, and GORSUCH, Circuit Judges.
   SEYMOUR, Circuit Judge.

Andrew John Yellowbear, Jr., appeals the district court’s denial of his habeas corpus petition filed under 28 U.S.C. § 2241. We reverse and remand for further proceedings.

I

On July 2, 2004, Andrew John Yellow-bear, Jr., an enrolled member of the Northern Arapaho Tribe, was arrested and charged in state court with first-degree murder in Riverton, Wyoming. Prior to trial, Mr. Yellowbear filed a pro se petition in federal district court seeking a writ of habeas corpus under 28 U.S.C. § 2254. Mr. Yellowbear challenged the state court’s jurisdiction, asserting that River-ton, Wyoming is located in “Indian Country,” over which the federal courts have exclusive jurisdiction for serious federal crimes. See 18 U.S.C. §§ 1151, 1152. The district court denied Mr. Yellowbear’s petition, holding he failed to state a claim because § 2254 is the habeas corpus procedure applicable once a state prisoner has been convicted and wants to contest the legality of that conviction. The court explained that pre-conviction relief was available to Mr. Yellowbear under 28 U.S.C. § 2241, but that he must first exhaust his state remedies.

Mr. Yellowbear filed a pro se appeal. Agreeing with the district court’s conclusion that Mr. Yellowbear was unable to rely on § 2254, this court construed the petition as one filed under § 2241. Because Mr. Yellowbear had not exhausted his state remedies, the court declined to grant a certificate of appealability. See Yellowbear v. Homecker, 130 Fed.Appx. 276 (10th Cir.2005) (unpublished).

While awaiting trial, Mr. Yellowbear filed a counseled motion with the state trial court asking for dismissal of the charges due to lack of jurisdiction. The court denied the motion. Again acting pro se, Mr. Yellowbear petitioned the Wyoming Supreme Court for a writ of review and stay of the trial court proceedings given his contention that the state court lacked jurisdiction. The Wyoming Supreme Court summarily denied Mr. Yel-lowbear’s petition.

During his trial, Mr. Yellowbear filed the present pro se petition for federal ha-beas corpus relief, this time under 28 U.S.C. § 2241, again asserting the state court had no jurisdiction over him because the alleged crime was committed in Indian Country. The federal district court dismissed the petition based on the Younger abstention doctrine. See Younger v. Harris, 401 U.S. 37, 91 S.Ct. 746, 27 L.Ed.2d 669 (1971). The court directed Mr. Yel-lowbear to conclude his claims in state court before seeking federal relief, stating that “[sjhould Mr. Yellowbear be unsuccessful at trial and on direct appeal to the Wyoming Supreme Court, he can then bring his federal claims before this court in a petition for habeas corpus relief pursuant to 28 U.S.C. § 2254.” Rec., vol. II at doc. 35, p. 5.

In the meantime, a jury found Mr. Yel-lowbear guilty and he was sentenced to life imprisonment. Mr. Yellowbear appealed. While that appeal was pending, Mr. Yel-lowbear brought this appeal from the federal district court’s denial of his § 2241 petition. We granted a certificate of ap-pealability.

II

We review de novo a district court’s decision to abstain based on Younger. See Roe No. 2 v. Ogden, 253 F.3d 1225, 1232 (10th Cir.2001). The district court decision was based primarily on the fact that Mr. Yellowbear was required to pursue his state court remedies before proceeding in federal court. In Mr. Yel-lowbear’s appeal of his state conviction, the Wyoming Supreme Court held, as relevant here, that the alleged crime did not occur in Indian Country as defined in 18 U.S.C. § 1151 and that state court jurisdiction was therefore proper. Yellowbear v. State, 174 P.3d 1270 (Wyo.2008). Because this claim has now been resolved in state court, the comity considerations which are the basis of Younger abstention, see Younger, 401 U.S. at 44-45, 91 S.Ct. 746, are no longer applicable.

Although the jurisdictional issue has now been decided by the state court, this case remains in an unusual procedural posture. As we have noted, Mr. Yellow-bear brought this action under 28 U.S.C. § 2241. Section § 2241 is a vehicle for challenging pretrial detention, see Walck v. Edmondson, 472 F.3d 1227, 1235 (10th Cir.2007), or for attacking the execution of a sentence, see Davis v. Roberts, 425 F.3d 830, 833 (10th Cir.2005). A § 2254 petition, on the other hand, is the proper avenue for attacking the validity of a conviction and sentence. Montez v. McKinna, 208 F.3d 862, 865 (10th Cir.2000). In its current posture, Mr. Yellowbear’s claim that the state court lacked jurisdiction over him is an attack on his conviction and sentence. His petition must therefore be brought under § 2254.

The issue of whether the state court properly exercised jurisdiction over Mr. Yellowbear is an important federal constitutional question which Mr. Yellow-bear has diligently endeavored to bring before the federal court. Absence of jurisdiction in the convicting court is indeed a basis for federal habeas corpus relief cognizable under the due process clause. See, e.g., Danforth v. Minnesota,—U.S.-, 128 S.Ct. 1029, 1036, 169 L.Ed.2d 859 (2008) (recognizing that, “[o]riginally, criminal defendants whose convictions were final were entitled to federal habeas relief only if the court that rendered the judgment under which they were in custody lacked jurisdiction to do so.”); Lonchar v. Thomas, 517 U.S. 314, 322, 116 S.Ct. 1293, 134 L.Ed.2d 440 (1996) (recognizing in a § 2254 action that “the writ has evolved into an instrument that now demands ... conviction by a court of competent jurisdiction”); Thomas v. Loney, 134 U.S. 372, 376, 10 S.Ct. 584, 33 L.Ed. 949 (1890) (“The courts of Virginia having no jurisdiction of the matter of the charge on which the prisoner was arrested, and he being in custody, in violation of the constitution and laws of the United States, ... he was rightly [ ] discharged by the circuit court on writ of habeas corpus.”); Lowery v. Estelle, 696 F.2d 333, 337 (5th Cir.1983) (“An absence of jurisdiction in the convicting court is ... a basis for federal habeas corpus relief cognizable under the due process clause.”); United States ex rel. Herrington v. Mancusi, 415 F.2d 205, 208-09 (2d Cir.1969) (“It has long been settled that habeas corpus relief is available to a defendant convicted by a court without jurisdiction.”) (citations omitted).

Given Mr. Yellowbear’s diligence in attempting to raise this constitutional issue before the federal court, we would be inclined to recharacterize his § 2241 petition as a § 2254 petition and remand to the district court to address the issue in the first instance. See Castro v. United States,. 540 U.S. 375, 377, 124 S.Ct. 786, 157 L.Ed.2d 778 (2003) (recognizing longstanding practice of federal courts to treat request for habeas relief under proper statutory section where pro se prisoner has labeled the petition differently). But recharacterization involves “potential consequences with respect to any § 2254 claim [a petitioner] may file in the future. AEDPA places strict limitations on second or successive claims.” Davis, 425 F.3d at 835. For this reason, in the context of a § 2255 petition, the Supreme Court has said that,

the district court must notify the pro se litigant that it intends to recharacterize the pleading, warn the litigant that this recharacterization means that any subsequent § 2255 motion will be subject to the restrictions on “second or successive” motions, and provide the litigant an opportunity to withdraw the motion or to amend it so that it contains all the § 2255 claims he believes he has.

Castro, 540 U.S. at 383, 124 S.Ct. 786. We therefore remand the case to allow Mr. Yellowbear to decide whether he wants to go forward with a § 2254 claim at this time.

In so doing, we note that construing Mr. Yellowbear’s petition as one brought under § 2254 would not subject him to the second or successive claim limitations of 28 U.S.C. § 2244(b)(1). Although Mr. Yellowbear’s first pro se habe-as petition was filed under § 2254, we recognized on appeal that it was more properly characterized as a § 2241 petition because it was filed pretrial and not while he was in custody pursuant to judgment of a state court. We agree with the court in Jacobs v. McCaughtry, 251 F.3d 596, 597-98 (7th Cir.2001), that where the first ha-beas petition filed under § 2254 was properly recharacterized as a § 2241 petition because the defendant was a pre-trial detainee, the subsequent filing of a § 2254 petition does not constitute a second or successive petition.

Accordingly, we REVERSE and REMAND this action to permit the district court to provide Mr. Yellowbear the opportunity to recharacterize his § 2241 action as a § 2254 petition if he so chooses, and to conduct further proceedings if Mr. Yel-lowbear decides to go forward with the petition as recharacterized. 
      
      . "An appellate court may give relief if state remedies are exhausted by the time it acts, even if those remedies were not exhausted when the habeas corpus petition was filed.” Osborn v. Shillinger, 861 F.2d 612, 616 (10th Cir.1988) (quotation and citation omitted).
     
      
      . Section 2255 is the statutory equivalent of § 2254 for federal prisoners. Davis v. United 
        
        States, 417 U.S. 333, 344, 94 S.Ct. 2298, 41 L.Ed.2d 109 (1974) ("§ 2255 was intended to mirror ... § 2254 in operative effect.”).
     