#### Juan De Dios MAGALLANES-ROBLEDO, Petitioner-Appellant, v. UNITED STATES of America; United States Department of Justice; Immigration and Naturalization Service, Respondents-Appellees.

No. 01-1090.

United States Court of Appeals, Tenth Circuit.

July 11, 2001.

Before EBEL, KELLY, and LUCERO, Circuit Judges.

ORDER AND JUDGMENT *

LUCERO, Circuit Judge.

Juan de Dios Magallanes-Robledo, an inmate at the Federal Correctional Institution in Florence, Colorado, filed a pro se application for a writ of habeas corpus under 28 U.S.C. § 2241 in the United States District Court for the District of Colorado. The district court concluded that the application should have been brought under 28 U.S.C. § 2255 in the District of Kansas, which was the district that imposed the sentence; consequently, the application was denied and dismissed without prejudice. Magallanes appeals, and we affirm.

Magallanes pleaded guilty to illegal reentry following deportation subsequent to an aggravated felony conviction in violation of 8 U.S.C. § 1326 and was sentenced to sixty-three months imprisonment by the United States District Court for the District of Kansas. Two weeks later, he filed a motion to withdraw his plea, which the district court denied. On direct appeal, this Court affirmed. *United States v. Magallanes-Robelo,*No. 00-3212, 2001 WL 179789, 3 Fed.Appx. 927 (10th Cir. Feb. 23, 2001). This habeas case was commenced November 17, 2000, and the district court dismissed on February 12, 2001.

Magallanes challenges the legality of his sentence on the grounds that he received ineffective assistance of counsel and that his sentence is based on alleged constitutional errors that occurred during his 1990 prosecution for aggravated sexual battery *858and his deportation hearing in 1993. We have construed Magallanes’s filings in this case liberally. *See Curley v. Petry,*246 F.3d 1278, 1281 (10th Cir.2001).

The district court’s denial and dismissal of Magallanes’s habeas application is subject to de novo appellate review. *Bradshaw v. Story,*86 F.3d 164, 166 (10th Cir.1996). Because Magallanes’s challenge is to the legality of his sentence, the district court correctly concluded that Magallanes’s petition should not have been brought under 28 U.S.C. § 2241 in the District of Colorado, but rather under 28 U.S.C. § 2255 in the District of Kansas. *See Haugh v. Booker,*210 F.3d 1147, 1149 (10th Cir.2000) (“A petition under 28 U.S.C. § 2241 attacks the execution of a sentence rather than its validity and must be filed in the district where the prisoner is confined. A 28 U.S.C. § 2255 petition attacks the legality of detention, and must be filed in the district that imposed the sentence.” (quotations omitted)); *see also*28 U.S.C. § 2255 H 5. For substantially the same reasons set forth by the district court, we AFFIRM. Magallanes’s motions requesting the transcript of his trial and for appointment of counsel are DENIED. The motion to proceed on appeal without prepayment of costs or fees is GRANTED.

The mandate shall issue forthwith.

*

 The case is unanimously ordered submitted without oral argument pursuant to Fed. R.App.P. 34(a)(2); 10th Cir.R. 34.1(G). This order and judgment is not binding precedent, except under the doctrines of law of the case, res judicata, and collateral estoppel. The Court generally disfavors the citation of orders and judgments; nevertheless, an order and judgment may be cited under the terms and conditions of 10th Cir.R. 36.3.