
    Manuel Joaquin Oliveira FERREIRA, Petitioner-Appellant, v. John ASHCROFT, Attorney General, Respondent-Appellee.
    No. 02-16945.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted Oct. 10, 2003.
    Submission Vacated Nov. 26, 2003.
    Resubmitted July 9, 2004.
    Filed Sept. 9, 2004.
    
      James Todd Bennett, Esq., El Cerrito, CA, for the petitioner-appellant.
    Joan G. Ruffennach, Esq., Assistant United States Attorney, Phoenix, AZ, for the respondent-appellee.
    Before: HUG, B. FLETCHER, and TASHIMA, Circuit Judges.
   TASHIMA, Circuit Judge:

Manuel Oliveira is a permanent resident alien who was ordered removed to Portugal after his 1998 conviction in California state court for possession of methamphetamine. In a petition for a writ of habeas corpus, he argued that the Immigration Judge (“IJ”) and the Board of Immigration Appeals (“BIA”) erred in concluding that he was an aggravated felon, because his conviction was a “wobbler” offense that the state court had sentenced as a misdemeanor. The district court denied his petition, ruling that Oliveira’s conviction constituted an aggravated felony because it was a controlled substance offense that was punishable by more than one year’s imprisonment under state law. We reverse. Oliveira’s offense of conviction is not an aggravated felony because it would not be punishable as a felony under federal drug laws and does not contain a trafficking element.

FACTUAL AND PROCEDURAL BACKGROUND

Oliveira is a native and citizen of Portugal who was admitted to the United States in 1966, at age eleven, as a lawful permanent resident alien. Both of his children are United States citizens, and his parents and siblings are either United States citizens or permanent resident aliens. The entire family resided in the San Jose, California area. Prior to his removal in 2002, Oliveira had never returned to Portugal.

In August 1994, Oliveira pleaded guilty in Wyoming state court to three misdemeanors: driving with a suspended license, carrying a concealed weapon, and possession of marijuana. Upon judgment of conviction, the court sentenced him to county jail for ten days on the weapon offense and ten days on the drug offense, the two sentences to run concurrently with credit for time served. The maximum possible sentence for the drug possession offense was six months. Wyo. Stat. Ann. § 35-7-1031(c) (1994).

In May 1998, Oliveira again pleaded guilty to possession of a controlled substance, methamphetamine, this time in violation of California Health and Safety Code § 11377(a). The statute provided that offenders “shall be punished by imprisonment in the county jail for a period of not more than one year or the state prison.” Cal. Health & Safety Code § 11377(a) (1998). The court sentenced Oliveira to four months in the county jail and three years’ probation. He also pleaded guilty to being under the influence of a controlled substance, in violation of California Health and Safety Code § 11550(a).

After Oliveira had finished serving his jail sentence, the Immigration and Naturalization Service (“INS”) placed him in a detention facility in Eloy, Arizona, and initiated removal proceedings against him. The INS filed a notice to appear, asserting that Oliveira’s 1998 controlled substance conviction made him removable under 8 U.S.C. § 1227(a)(2)(B)(i). Oliveira admitted the factual allegations in the notice to appear and conceded removability, but moved for cancellation of removal under 8 U.S.C. § 1229b(a). The INS argued to the IJ that Oliveira was ineligible for cancellation of removal because the Wyoming conviction for possession of a controlled substance and the California conviction for possession of a controlled substance together constituted an aggravated felony.

At Oliveira’s cancellation of removal hearing, the IJ ruled that the two convictions for simple possession together constituted an aggravated felony. The IJ came to this conclusion based on our decision in United States v. Garcia-Olmedo, 112 F.3d 399, 400-01 (9th Cir.1997), which we have since implicitly overruled. See United States v. Corona-Sanchez, 291 F.3d 1201, 1209 (9th Cir.2002) (en banc) (holding that, in determining whether an offense is an aggravated felony, “we must consider the sentence available for the crime itself, without considering separate recidivist sentencing enhancements”). The IJ therefore denied Oliveira’s application for cancellation of. removal and ordered him to be removed to Portugal.

Oliveira filed a timely appeal with the BIA, which affirmed the IJ’s ruling. Oliveira then filed a petition for review with this Court, but we dismissed the petition for lack of jurisdiction.

Oliveira then filed this habeas petition contending that his detention based on the order of removal violated the Constitution and laws of the United States. Among other things, he argued that his Wyoming marijuana possession conviction could not serve as a predicate offense to a finding that his second possession conviction was an aggravated felony.

The magistrate judge assigned to the case recommended that Oliveira’s petition be denied. The magistrate judge concluded that Oliveira’s 1998 conviction for possession of methamphetamine alone constituted an aggravated felony because California classified the crime as a felony. In addition, the magistrate judge concluded that the conviction was a felony under federal law, because Oliveira had a prior conviction for drug possession.

The district court denied Oliveira’s habe-as petition. Although it agreed with the magistrate judge’s ultimate conclusion that Oliveira was an aggravated felon, it based its decision on different legal grounds. The court noted that under our cases interpreting the federal sentencing guidelines, an offense is an aggravated felony if it (1) is prohibited under the federal Controlled Substances Act (“CSA”), 21 U.S.C. §§ 801-904, and (2) is punishable by more than one year of imprisonment under federal or state law. The court found that possession of methamphetamine is prohibited under 21 U.S.C. § 844(a), and that under California law the crime is punishable by more than one year’s imprisonment. The district court therefore concluded that Oliveira’s 1998 conviction for possession of methamphetamine was an aggravated felony. This appeal followed.

JURISDICTION

The district court had jurisdiction pursuant to 28 U.S.C. § 2241. We have jurisdiction over this appeal pursuant to 28 U.S.C. §§ 1291 and 2253(a). Although the INS has removed Oliveira to Portugal, and he is therefore no longer in custody, we continue to have jurisdiction because he filed his habeas petition before his removal and “continues to suffer actual collateral consequences of his removal.” Zegarra-Gomez v. INS, 314 F.3d 1124, 1127 (9th Cir.2003). In particular, the administrative determination that Oliveira is an aggravated felon renders him ineligible to seek readmission to the United States for 20 years. See 8 U.S.C. § 1182(a)(9)(A)(ii).

STANDARD OF REVIEW

We review de novo a district court’s decision on a petition for a writ of habeas corpus. Thai v. Ashcroft, 366 F.3d 790, 793 (9th Cir.2004).

ANALYSIS

An alien who is convicted of an aggravated felony is subject to deportation. 8 U.S.C. § 1227(a)(2)(A)(iii). In addition, such an alien is ineligible for cancellation of removal. Id. § 1229b(a)(3). The issue in this appeal is whether the district court erred in concluding that a violation of California Health and Safety Code § 11377 is an aggravated felony.

We have only recently considered whether we should interpret “aggravated felony” differently in the immigration context than we do in the criminal sentencing enhancement context. See Cazarez-Gutierrez v. Ashcroft, 382 F.3d 905, 910-19, 2004 WL 1879240, *3-*12 (9th Cir. Aug.24, 2004). In the criminal sentencing context, we have held that a drug offense is an aggravated felony if it (1) is punishable under the CSA, and (2) is a felony. United States v. Robles-Rodriguez, 281 F.3d 900, 903 (9th Cir.2002). To determine whether an offense is a felony, we examine whether it is punishable by more than one-year imprisonment under applicable federal or state law. Id. at 903-04.

We noted in Cazarez-Gutierrez, however, that the immigration context is poles apart from the criminal sentencing context. “Because states are primarily responsible for criminal law enforcement, there is no pressing need for national uniformity in the sentencing enhancement context, and it is not surprising that the courts of appeals interpreting the Sentencing Guidelines have incorporated variations in state punishments for drug offenses.” 382 F.3d at 914, 2004 WL 1879240, at *6. In the immigration context, by contrast, the need for national uniformity is paramount, as the “ ‘[pjower to regulate immigration is unquestionably exclusively a federal power.’ ” Id. at 912, 2004 WL 1879240, at *5 (quoting DeCanas v. Bica, 424 U.S. 351, 354, 96 S.Ct. 933, 47 L.Ed.2d 43 (1976)). For this reason, we have “ ‘repeatedly recognized that the immigration laws should be applied uniformly across the country, without regard to the nuances of state law.’ ” Id. at 913, 2004 WL 1879240, at *6 (quoting Ye v. INS, 214 F.3d 1128, 1132 (9th Cir.2000)).

After analyzing the interest in national uniformity in immigration law, and Congressional intent with regard to the definitions of “aggravated felony” and “drug trafficking crime,” we concluded in Cazarez-Gutierrez that “Congress did not intend to incorporate state variations in the punishment of drug offenses into immigration law.” Id. at 917, 2004 WL 1879240, at *10. Cazarez-Gutierrez’s reasoning compels us to hold that a state drug offense is not an aggravated felony for immigration purposes unless it is punishable as a felony under the CSA or other federal drug laws named in the definition of “drug trafficking crime,” or is a crime involving a trafficking element.

In determining whether Oli-veira’s 1998 state drug offense is an aggravated felony, therefore, the first question is whether Oliveira’s conviction for possession of a controlled substance would be punishable as a felony under the CSA. Here, Oliveira does not dispute that simple possession of methamphetamine is prohibited under the CSA. See 21 U.S.C. § 844(a); 21 C.F.R. § 1308.12(d). However, a violation of California Health and Safety Code § 11377 would not be a felony under the CSA. Under the CSA, the maximum penalty for possession of a generic controlled substance is one year. 21 U.S.C. § 844(a); United States v. Arellano-Torres, 303 F.3d 1173, 1178 (9th Cir.2002) (explaining that “[bjecause one year is the maximum term of imprisonment authorized for a first-time offender of § 844 ..., simple possession is not ‘punishable by more than one year’s imprisonment under applicable ... federal law’ ” (quoting Robles-Rodriguez, 281 F.3d at 904)), cert. denied, 538 U.S. 915, 123 S.Ct. 1502, 155 L.Ed.2d 241 (2003). Under Corona-Sanchez, we “must consider the sentence available for the crime itself, without considering separate recidivist sentencing enhancements.” 291 F.3d at 1209. Therefore, a violation of § 11377 would not be punishable by more than one-year imprisonment under federal law and so this crime would not be a felony.

As Oliveira’s 1998 conviction would not be a felony under federal drug laws, we next must determine whether his offense of conviction — unauthorized possession of a controlled substance — contains a trafficking element. It clearly does not. See Cal. Health & Safety Code § 11377. Thus, under the test we apply to determine whether an offense is an aggravated felony for immigration purposes, the district court erred in holding that Oliveira had committed an aggravated felony.

We note that even if we were to consider whether a violation of § 11377 is punishable by more than one year’s imprisonment under California law, Oliveira’s 1998 conviction would still not constitute an aggravated felony. The statute provides that offenders “shall be punished by imprisonment in a county jail for a period of not more than one year or in the state prison.” Cal. Health & Safety Code § 11377(a). The California Penal Code provides that “[w]hen a crime is punishable, in the discretion of the court, by imprisonment in the state prison or by fine or imprisonment in the county jail, it is a misdemeanor for all purposes,” if a state prison term is not imposed. Cal.Penal Code § 17(b)(1). The maximum punishment for misdemeanors is six months in the county jail. Cal.Penal Code § 19.

Although § 11377 allows for a maximum penalty of more than one-year imprisonment, it is a “wobbler” offense that the court may sentence as a misdemeanor. Once the state court sentenced Oliveira to a county jail term rather than a term in the state prison, the offense automatically converted from a felony into a misdemean- or for all purposes. CahPenal Code § 17(b)(1); Garcia-Lopez v. Ashcroft, 334 F.3d 840, 844 (9th Cir.2003). Under California law, the maximum penalty for a misdemeanor is six months’ imprisonment, and Oliveira’s offense is therefore not an aggravated felony. See id. at 846 (holding with regard to a “wobbler” offense that “[bjecause the offense of which he was convicted was a misdemeanor, Garcia-Lopez’s maximum possible penalty under California law was less than six months”).

CONCLUSION

Oliveira’s 1998 conviction does not constitute an aggravated felony under federal law, and he was therefore eligible for cancellation of removal under 8 U.S.C. § 1229b(a). Although Oliveira has already been removed to Portugal, he was never allowed the opportunity to apply for cancellation of removal, an opportunity he would have had had he not been erroneously classified as an aggravated felon. Therefore, we remand to the district court with instructions to grant Oliveira’s petition for a writ of habeas corpus directing that the BIA consider on the merits his application for cancellation of removal, which, if successful, will enable him to return to the United States.

REVERSED and REMANDED. 
      
      . We recently held that issue preclusion can bar an alien from challenging in a habeas proceeding the aggravated nature of a felony conviction, if we necessarily decided that issue in dismissing on jurisdictional grounds his or her petition for review. See Nunes v. Ashcroft, 375 F.3d 805, 809-10 (9th Cir.2004). In Oliveira's case, our determination that we lacked jurisdiction over his petition for review neither involved a finding that he had committed an aggravated felony nor required such a finding. Instead, we initially suggested that we lacked jurisdiction over Oliveira's petition for review by reason of his having been convicted of a controlled substance violation — not an aggravated felony — under 8 U.S.C. § 1227(a)(2)(B)(i). See 8 U.S.C. § 1252(a)(2)(C). Our subsequent order dismissing for lack of jurisdiction suggests no other basis for the dismissal. Moreover, as the government did not plead issue preclusion as an affirmative defense, we have broad discretion to apply (or not apply) it here. See Galvin v. Hay, 374 F.3d 739, 749 n. 8 (9th Cir.2004).
     
      
      . California defines a felony as “a crime which is punishable with death or by imprisonment in the state prison.” Cal.Penal Code § 17(a). In the absence of statutory provisions to the contrary, felonies are punishable by imprisonment in state prison for 16 months, two years, or three years. Cal.Penal Code § 18.
     
      
      . The government points out that the California judgment document designates Oliveira’s conviction for violation of § 11377 with an "F” for "felony.” This is not dispositive, however, because a person who pleads guilty to a wobbler acquires the provisional status of a felon until sentenced to something other than confinement in a state prison, at which point the offense is automatically converted for all purposes into a misdemeanor. Garcia-Lopez, 334 F.3d at 844 & n. 5.
     