[DO NOT PUBLISH]

IN THE UNITED STATES COURT OF APPEALS
FOR THE ELEVENTH CIRCUIT

________________________ No. 12

- 14419 Non

- Argument Calendar

________________________ D.C. Docket No. 1:11

- cv - 23580

- JAL

ROBERT RAMESES, Petitioner

- Appellant,

versus UNITED STATES DISTRICT COURT, for the Eastern District of California, US DEPARTMENT OF JUSTICE, RICHARD SCRUGGS, United States Attorney, DAVID DEMAIO, United States Attorney, HERBERT COUSINS, FBI Agent, et al., Responde nts

- Appellees.

________________________ Appeal from the United States District Court for the Southern District of Florida

________________________ (July 22, 2013) Case: 12-14419 Date Filed: 07/22/2013 Page: 1 of 92 Before TJOFLAT , HULL and PRYOR, Circuit Judges.
PE R CURIAM: Robert Rameses, a California state prisoner pr oceeding pro se , appeals the district court’s dismissal of his “Motion for Extraordinary Remedy of Specific Performance as Part of Plea Agreement” (“Motion”) . The district court construed the Motion as a petition for a writ of habeas corpus under 28 U.S.C . § 2254 and dismissed it for lack of subject matter jurisdiction

. After review, we affirm. I. BACKGROUND On October 3, 2011, Rameses filed his Motion in the United States District Court for the Southern District of Florida. Rameses’s Motion named various state and federal actors, as well as the “United States District Court, For The Ea stern District” as respondents. In the Motion, Rameses asserted that in 1988 he entered into a plea agreement with the United States and the State of Florida

. Rames es attached a copy of the 1988 plea agreement to the Motion. As memorialized in the plea agreement , Rameses agreed to plead guilty to four counts of second degree murder in Florida state court and to cooperate with federal and state law enforce ment in sol ving certain crimes. In exchange, the S tate agreed to dismiss other criminal charges against Rameses, to recommend that Rameses receive a 22

- year sentence of imprisonment on the four murder counts, and to grant Rameses “the broadest

Case: 12-14419 Date Filed: 07/22/2013 Page: 2 of 93 type of use and deriva tive use immunity (but not transactional immunity)” for crimes he committed bef ore signing the plea agreement. The United States was not a party to this 1988 plea agreement. However, in two letters written to Rameses by an Assistant United States Attorney for the Southern District of Florida , the United States agreed to “consider[] itself bound by the terms of the written Plea Agreement between the State of Florida and [Rameses] .” These letters ref erenced the 1988 plea agreement’s immunity provision and set forth that the United States “agreed that no federal charges will be filed against [Rameses] for any of the criminal acts disclosed . . . during the course of his interviews with fede ral and stat e law enforcement.” Rameses ultimately served a sentence of fewer than ten years’ imprisonment for his four Florida murder convictions

. After his release from prison, Rameses made his way to California. Twelve years after executing the 1988 plea agreement , Rameses in 2000 was convicted by a jury in California state court for passing bad checks

. Pursuant to California’s three

- strikes law, the California state prosecutor submitted Rameses’s four prior Florida second degree murder convictions to the jury. T he jury, in turn, enhanced Rameses’s sentence for th e bad

- checks offense to a term of 25 years to life imprisonment based on these prior convictions. Rameses is currently serving this enhanced sentence in California state prison.

Case: 12-14419 Date Filed: 07/22/2013 Page: 3 of 94 Before filing his Motion in the Southern District of Florida, Rameses made at least two prior attempts in California to obtain federal post

- conviction relief related to his California bad

- checks conviction. In 2005, Rameses filed a § 2254 petition in the Eastern District of California

— where he is incarcerated

— which that district court denied on the merits in 2008. See Rameses v. Kernan , No. CIV S

- 04

- 1173, 2008 WL 883108 (E.D. Cal. Mar. 31, 2008) (adopting magistrate j udge’s report, 2007 WL 4200814 (E.D. Cal. Nov. 27, 2007) , and denying Rameses’s petition in its entirety). One of the claims Rameses raised in his 2005 § 2254 petition was that California “ prosecutors were motivated to pursue [his] case as a Three Strikes case by relying, at least in part, on immunized testimony .”
Rameses , 2007 WL 4200814 at *1. On May 13, 2011, Rameses filed a “motion for extraordinary remedy of specific perfor mance as part of plea agreement ” in the Eastern District of California, whic h that district court construed as a successive § 2254 petition and dismissed in January 2012. In his instant 2011 M otion, Rameses argued that the California prosecutor ’s pursuit of a three

- strikes enhanced sentence , based on Rameses’s four “immunized” Florida murder convictions , violated the immunity provisions of the 1988 plea agreement. Rameses requested an evidentiary hearing and “specific perfor mance of [his] plea agreement.” The federal government appeared on behalf of the federal resp ondents and Case: 12-14419 Date Filed: 07/22/2013 Page: 4 of 95 filed a response to Rameses ’s 2011 Motion. In pertinent part, the federal government contended that (1) the district court should construe Rameses’s Motion as a petition for a writ of habeas corpus filed under § 2254, in light of the injury
Ra meses alleged and the relief he requested; and (2) the Motion was a nearly verbatim copy of the earlier, successive § 2254 petition that Rameses had filed in 2011 in the Eastern District of California. The government argued that a person in state custody could file a § 2254 petition but only in the federal court for the district where he was incarcerated or where t he state court is located that convicted and sentenced him to that custody

. Because Rameses was convicted and sentenced in a state court locate d within the Eastern District of California, and was in state custody with in the same district, the district court in the Southern District of Florida lacked subject matte r jurisdiction over the Motion. Following the federal government’s response, a magistrate judge issued a report and recommendation (“R&R”) concerning Rameses’s Motion

. In the R&R, the magistrate judge construed Rameses’s Motion as a petition for a writ of habeas
corpus filed under § 2254 , explaining that the Motion necessarily reli ed upon § 2254 because Rameses was in state custody and he sought post

- conviction relief in federal court related to his California bad

- checks conviction and sentence

. However, the magistrate judge then noted that § 2241 (d) governs where persons in state custody can file § 2254 petitions challenging their state convictions and

Case: 12-14419 Date Filed: 07/22/2013 Page: 5 of 96 sentences . Under § 2241(d), Rameses could file a § 2254 petition challenging his California conviction and sentence in either (1) “ the district court for the distr ict within which the [s] tate court was held which convicted and sentenced him ”; or (2)

“ the district court for the district wherein [he was] in custody

. ” See 28 U.S.C. § 2241(d). Thus, pursuant to § 2241(d), b ecause a state court located in California

c onvicted and sentenced Rameses for passing bad checks , and because he was “in custody” serving his sentence in California, the magistrate judge found that
Rameses’s Motion, filed in the Southern District of Florida, did not satisfy § 2241(d). And, because § 2241(d) was not satisfied, the dist rict court in the Southern District of Florida did not have subject matter jurisdiction to con sider the merits of the Motion

. Accordingly, the magistrate judge recommended dismissing
Rameses’s Motion

. 1 The district court adopted the magistrate judge’s R&R without objection from either party and dismissed Rameses’s Motion . Rameses then timely appealed. 2

1 In the R&R

— which the district court later adopted

— the magistrate judge recommended t hat Rameses’s M otion be “denied.” However, despite the use of this terminology, we construe the district court’s disposition of Rameses’s Motion as a dismissal , rather than a denial, in light of the district court ’s determination that it lacked subject matter jurisdiction to consider the Motion

. 2 W e review de novo a district court’s dismissal for lack of jurisdiction. Diaz v. Fla. Fourth Judicial Circuit ex rel. Duval Cnty. , 683 F.3d 1261, 1263 (11th Cir. 2012).

Case: 12-14419 Date Filed: 07/22/2013 Page: 6 of 97 II. DISCUSSION A federal court may recharacterize a pro se litigant’s motion to create a better correspondence between the substance of the motion and its underlying legal basis. Castro v. United States , 540 U.S. 375, 381

– 82, 124 S. Ct. 786, 791

– 92 (2003). “[A] state p risoner seeking post

- conviction relief from a federal court has but one remedy: an application for a writ of habeas corpus. ” Medberry v. Crosby , 351 F.3 d 1049, 1062 (11th Cir. 2003). All applications for writs of habeas corpus , including those filed und er 28 U.S.C. § 2254 by persons in state custody, are governed by 28 U.S.C. § 2241

. Id. Under § 2241(a), f ederal d istrict courts may grant writs of habeas corpus only “within their respective jurisdictions.” 28 U.S.C. § 2241(a). For a person who is

“ in custody under the j udgment and sentence of a [s] tate court ” and who wishes to file a § 2254 application, § 2241(d) specifies the “respective jurisdictions” where such an application may be filed. Under § 2241(d), a person in custody under the judgment of a state court may file his application for a writ of habeas corpus in the federal district (1) “ within which the [s] tate court was held which convicted and sentenced him ”; or (2) “ wherein [he ] is in custody .” 28 U.S.C. § 2241(d); see also Eagle v. Linahan , 279 F.3d 926, 933 n.9 (11th Cir. 2001). Further, “ [ a ] petitioner is not ‘in custody’ to challenge a conviction when the sentence imposed for that conviction has completely expired.” Van Zant v. Fla.

Case: 12-14419 Date Filed: 07/22/2013 Page: 7 of 98 Parole Comm’n , 104 F.3d 325, 327 (11th Cir. 1997). However, a habeas petitioner may challenge the use of a prior conviction with an expired sentence to enhance the sentence imposed for a later crime if he is currently serving the later, enhanced
sentence. Id. For pu rposes of the “in custody” requirement, t he petitioner is deemed to be challenging the sentence for his later conviction , which, in Rameses’s case, is his California bad

- checks conviction

. Id.
Here , the district cour t properly construed Rameses’s M otion a s an application for a writ of habeas corpus filed under § 2254 and governed by § 2241’s jurisdictional requirements

. See Castro , 540 U.S. at 381

– 82, 124 S. Ct. at 791

– 92. B ecause Rameses’s Florida sentence for his state murder convictions “ has completely expired, ” Rameses is not “in custody” for the purpose of challenging
t hose Florida convictions directly

. Van Zant , 104 F.3d at 327. Rather , Rameses is “in custody” for purposes of challeng ing the three

- strikes enhancement to his California sta te sentence that resulted from his expired Florida murder convictions. See id. Accordingly , Rameses ’s problem is that because he is “in custody” pursuant
to a sentence imposed by a state court located in California, and he is incarcerated in California, he plainly has filed his Motion in the wrong court. Here, t he district
court in Florida correctly concluded that it lacked subject matter jurisdiction over the Motion because, under § 2241(d), Rameses may only petition for a writ of

Case: 12-14419 Date Filed: 07/22/2013 Page: 8 of 99 habeas corpus in f eder al district court in California, which is both where “ the [s]tate court was held which convicted and sentenced him” and “wherein [ he ] is in custody.” 28 U.S.C. § 2241(d); see Eagle , 279 F.3d at 933 n.9. T he district court in the Southern District of Florida lacked subject matter jurisdiction over Rameses’s Motion , which challenged his enhanced California sentence

. In light of the foregoing, we affirm the district court’s dismissal of
Rameses’s Motion

. A FFIRMED. Case: 12-14419 Date Filed: 07/22/2013 Page: 9 of 9