
    UNITED STATES of America, Plaintiff-Appellee, v. Jose Manuel SALDANA, a.k.a. Emanuel Santa, a.k.a. John Gotti, a.k.a. Pye, a.k.a. Popeye, a.k.a. Jose Soto, Francisco Saldana, Jesus Morejon, Quamil Haywood, David Velez, Steve Harris, Defendants-Appellants.
    No. 05-16127
    Non-Argument Calendar.
    United States Court of Appeals, Eleventh Circuit.
    April 15, 2008.
    
      Jose Manuel Saldana, Coleman, FL, pro se.
    Francisco Saldana, Beaumont, TX, pro se.
    Jesus Morejon, Waymart, PA, pro se.
    Quamil Haywood, Jesup, GA, pro se.
    David Velez, Otisville, NY, pro se.
    Steven J. Harris, Edgefield, SC, pro se.
    Lisa A. Hirsch, Anne R. Schultz, Kathleen M. Salyer, U.S. Attorney’s Office, Miami, FL, for Plaintiff-Appellee.
    Before BIRCH, DUBINA and CARNES, Circuit Judges.
   PER CURIAM:

Jose Saldana, Francisco Saldana, Jesus Morejon, Steven Harris, Quamil Haywood, and David Velez, federal prisoners proceeding pro se, appeal the district court’s denial of their motions to vacate a separation order as moot. The appellants filed their motions in the Southern District of Florida. In these motions, the appellants request that the district court lift a separation order so that they may be confined in the same prison.

As an initial matter, we must determine the statutory authority under which the appellants were proceeding when they filed their motions in the district court. The pleadings of pro se litigants should be liberally construed. Gomez-Diaz v. United States, 433 F.3d 788, 791 (11th Cir. 2005). However, any leniency in the construction of the pleadings does not allow a court to “rewrite an otherwise deficient pleading to sustain an action.” GJR Investments, Inc. v. County of Escambia, Fla., 132 F.3d 1359, 1369 (11th Cir.1998). Courts “must look beyond the labels of motions filed by pro se inmates to interpret them under whatever statute would provide relief.” Means v. Alabama, 209 F.3d 1241, 1242 (11th Cir.2000).

This Court has considered an attack by a federal prisoner on his place of confinement to be relief sought pursuant to 28 U.S.C. § 2241. Ledesma v. United States, 445 F.2d 1323, 1323-24 (5th Cir.1971) (affirming a district court construing a 28 U.S.C. § 2255 motion that attacked the place of confinement as a § 2241 petition); see also Beck v. Wilkes, 589 F.2d 901, 902-04 (5th Cir.1979) (addressing a § 2241 petition that challenged the transfer of a federal prisoner from a federal facility in Virginia to a federal facility in Georgia). The appellants are challenging where they are confined. Thus, the district court should have construed their motions as federal habeas petitions filed pursuant 28 U.S.C. § 2241.

Only a court inside the district where the prisoner is confined has jurisdiction to grant relief pursuant to a § 2241 petition. Ledesma, 445 F.2d at 1324. When the district court enters a judgment on § 2241 petition even though it lacked jurisdiction over the prisoner, we will vacate the judgement and remand to the district court with instructions to dismiss the petition for lack of jurisdiction. Hajduk v. United States, 764 F.2d 795, 796 (11th Cir.1985). If it is in the interest of justice, the district court has the alternative of transferring the petition to the proper district court. See Goldlawr, Inc. v. Heiman, 369 U.S. 463, 465-67, 82 S.Ct. 913, 915-16, 8 L.Ed.2d 39 (1962) (citing 28 U.S.C. § 1406(a)).

None of the petitioners are confined in the Southern District of Florida, so the district court lacked jurisdiction to consider their § 2241 petitions. See Ledesma, 445 F.2d at 1324. Accordingly, we vacate the district court’s order and remand the case back to the district court to dismiss the motions without prejudice or to transfer the motions to the respective district court where each appellant is confined.

VACATED AND REMANDED. 
      
      . In our en banc decision Bonner v. City of Prichard, 661 F.2d 1206, 1209 (11th Cir. 1981), we adopted as binding precedent all decisions of the former Fifth Circuit handed down prior to October 1, 1981.
     