MEMORANDUM *
Pedro Villa-Valladolid appeals the district court’s denial of his habeas corpus petition under 28 U.S.C. § 2241 challenging the final administrative order of removal by the Board of Immigration Appeals. We treat his appeal as a petition for review and deny it.
Villa-Valladolid, a native and citizen of Mexico, arrived in the United States in 1970. In 1988, he was granted temporary resident status under an amnesty program. Two years later, he pled guilty in California state court to possession of marijuana for sale. Shortly thereafter, his immigration status was adjusted to that of a lawful permanent resident. In January 1992, Villa-Valladolid was convicted of burglary in the second degree.
In April 2002, the Government initiated removal proceedings against Villa-Valladolid. In a notice to appear, he was charged with being removable on three grounds: (1) as an alien convicted of an aggravated felony (i.e., drug trafficking); (2) as an *179alien who at the time of his adjustment of status was within one or more inadmissible classes (i.e., he was an alien convicted of a law relating to a controlled substance); and (8) as an alien convicted of a crime involving moral turpitude (i.e., burglary conviction). Villa-Valladolid, represented by counsel, appeared before an immigration judge, and at the master calendar hearing, he requested a continuance in order to fully develop the claim that he was eligible for relief under the waiver provisions of Sections 212(c) and 212(h) of the Immigration and Nationality Act (codified at 8 U.S.C. §§ 1182(c) and 1182(h)) (repealed 1996). His request was denied, and he was ordered removed to Mexico. The BIA affirmed the immigration judge’s decision.
Villa-Valladolid then filed a petition for a writ of habeas corpus in federal court. The court denied his petition, concluding that he was statutorily ineligible for relief under § 212(c) and § 212(h) and that his constitutional right to due process was not violated.
This Court has jurisdiction to review the questions in this habeas petition pursuant to INA § 242(b)(2), 8 U.S.C. § 1252, and § 106(c) of the REAL ID Act of 2005, Pub.L. No. 109-13, § 106, 119 Stat. 231, 310-11 (May 11, 2005). Section 106(c) directs district courts in which 28 U.S.C. § 2241 habeas petitions were pending on May 11, 2005, to transfer those cases to the appropriate courts of appeals, which are then to review them as if they had been brought as direct appeals pursuant to § 242(b)(2), as amended by the REAL ID Act. The Section does not on its face apply to petitions pending before the courts of appeals, but we have previously held that such petitions should be treated as timely filed petitions for direct review. Alvarez-Barajas v. Gonzales, 418 F.3d 1050, 1052 (9th Cir.2005).
Villa-Valladolid was ineligible for a waiver of deportation under § 212(c) because his immigration status as a temporary resident was unlawfully changed to that of a permanent resident. See Monet v. INS, 791 F.2d 752, 753 (9th Cir.1986) (holding that the term “lawfully” admitted “denotes compliance with substantive legal requirements, not mere procedural regularity”) (quotation omitted). To be eligible for § 212(c) relief at the time of his guilty plea, Villa-Valladolid was required to show that he was admitted to the United States as a lawful permanent resident. Although his immigration status had been automatically adjusted to that of lawful permanent resident in 1991, he was never eligible for the adjustment. To be statutorily eligible for an adjustment, an alien must be admissible to the United States as a permanent resident. See INA § 245 (codified at 8 U.S.C. § 1255). However, an alien who is convicted of violating any federal, state, or foreign law “relating to a controlled substance” is inadmissible. See INA § 212(a)(2)(A)(i)(II) (codified at 8 U.S.C. § 1182(a)(2)(A)(i)(II)). Thus, Villa-Valladolid was ineligible to obtain lawful permanent resident status and therefore ineligible for a waiver of deportation under § 212(c). Cf. Bui v. INS, 76 F.3d 268, 270-71 (9th Cir.1996) (inadmissible aliens are ineligible for an adjustment of status without a § 212(h) waiver).
Villa-Valladolid is also ineligible for a waiver of inadmissibility under § 212(h) because his prior conviction did not involve a minor controlled substance offense for which a waiver could be granted. 8 U.S.C. § 1182(h). Villa-Valladolid was convicted of possessing marijuana for sale, not simple possession.
We need not decide whether VillaValladolid’s due process rights were violated when the immigration judge ordered *180him removed at a master calendar hearing and refused his attorney’s request for a continuance because Villa-Valladolid cannot establish prejudice as a result of this alleged violation. See Colmenar v. INS, 210 F.3d 967, 971 (9th Cir.2000) (holding that a BIA decision will not be reversed on due process grounds unless the alien shows that the alleged violation may have affected the outcome of the proceeding). Because, as discussed, Villa-Valladolid is ineligible for relief under either section, the alleged due process violation did not affect the outcome of his removal proceedings.
The district court correctly denied VillaValladolid’s petition for writ of habeas corpus.
AFFIRMED.
This disposition is not appropriate for publication and may not be cited to or by the courts of this circuit except as provided by Ninth Circuit Rule 36-3.