PER CURIAM:
Abraham Hernandez, federal prisoner #82325-179, appeals the district court’s dismissal of his 28 U.S.C. § 2241 petition for lack of jurisdiction. In the petition, Hernandez challenged his conviction and 252-month term of imprisonment for conspiracy to possess with intent to distribute 201 kilograms of cocaine.
Hernandez asserts that the district court had jurisdiction over his petition because both he and his custodian, the warden of his prison facility, are within the Northern District of Texas. He contends that 28 U.S.C. § 2255 is inadequate or ineffective to test the legality of his detention and that the dismissal of his § 2241 petition impermissibly suspends the writ of habeas corpus. Hernandez also briefs the merits of his claim that his drug conspiracy conviction is unconstitutional because the Controlled Substances Act violates the Tenth Amendment and exceeds the Government’s power under the Commerce Clause.
We review a district court’s dismissal of a § 2241 petition de novo. Kinder v. Purdy, 222 F.3d 209, 212 (5th Cir.2000). A § 2241 petition and a § 2255 motion “are distinct mechanisms for seeking post-conviction relief.” Pack v. Yusuff, 218 F.3d 448, 451 (5th Cir.2000). Section 2255 is the primary mechanism for collaterally attacking a federal sentence, and a § 2255 motion must be filed in the sentencing court. Id. Section 2241 is the proper procedural vehicle for challenging the manner in which a sentence is executed, and a § 2241 petition must be filed in the district of incarceration. Id. “A section 2241 petition that seeks to challenge the validity of a federal sentence must either be dismissed or construed as a section 2255 motion.” Id. at 452.
Because Hernandez’s § 2241 claims attacked the validity of his conviction and sentence, the district court did not err in determining that the claims would be properly brought in a § 2255 motion. See Pack, 218 F.3d at 451. As Hernandez was sentenced in the Southern District of Texas, the district court in the Northern District of Texas correctly determined that it lacked jurisdiction to consider his petition as a § 2255 motion. See Ojo v. INS, 106 F.3d 680, 683 (5th Cir.1997).
A prisoner may attack the validity of his conviction in a § 2241 petition only if he can meet the requirements of the savings clause of § 2255(e). Kinder, 222 F.3d at 212. As the district court reasoned, because Hernandez’s direct appeal remains pending in this court, he cannot show that the remedy under § 2255 is inadequate or ineffective. See Reyes-Requena v. United States, 243 F.3d 893, 901 (5th Cir.2001); cf. United States v. Bernegger, 661 F.3d 232, 241 (5th Cir.2011) (“A defendant cannot collaterally attack his conviction until it has been affirmed on direct appeal.”); Fassler v. United States, 858 F.2d 1016, 1019 (5th Cir.1988) (same).
To the extent that Hernandez argues that the dismissal of his § 2241 petition impermissibly suspends the writ of habeas corpus, we have “held that the savings clause under § 2255 does not violate the Suspension Clause.” Wesson v. United States Penitentiary Beaumont, TX, 305 F.3d 343, 347 (5th Cir.2002) (relying on Reyes-Requena, 243 F.3d at 901 n. 19).
AFFIRMED.
Pursuant to 5th Cir. R. 47.5, the court has determined that this opinion should not be published and is not precedent except under the limited circumstances set forth in 5th Cir. R. 47.5.4.