The Oregon Court of Appeals on Wednesday threw out the conviction of a Wilsonville methamphetamine dealer because his defense attorney didn't tell him that he faced mandatory deportation.

Javier Garcia-Navarro, 48, had lived many years in the U.S. as a permanent legal resident when he was caught in 2012 selling methamphetamine to an informant and had two small baggies in his car while returning from a trip visiting family in Mexico, investigators said.

Garcia-Navarro pleaded guilty to a pair of felonies and was sentenced in Clackamas County Circuit Court to more than two years in prison.

At some point after that, he was deported.

Garcia-Navarro appealed, saying he hadn't realized that the law required his deportation. The married father of three who worked as a granite-counter installer said if he had known, he would have gone to trial to fight for his ability to stay in the U.S.

According to the summary of the case, his defense attorney, John Terry, informed Garcia-Navarro before his plea hearing that if a judge sentenced him to probation, he might fly under the radar of immigration officials. But if the judge sentenced him to prison, he would be head to deportation court and his deportation would be "essentially guaranteed," Terry said.

The lawyer said he was basing the advice on his real-world experience that a defendant who gets probation "never" gets deported.

Garcia-Navarro appealed his conviction. A post-conviction judge, William Horner, found the defense lawyer's advice good enough notice to let Garcia-Navarro's conviction stand.

But the Appeals Court disagreed, saying that a defense attorney must tell defendants convicted of most any drug crime that they will be deported. The Appeals Court said it's not good enough to warn a defendant that they might be deported because the law says deportation is mandatory.

In making its ruling, the Appeals Court cited a 2010 U.S. Supreme Court case, Padilla v. Kentucky, in which another drug crimes defendant's conviction was overturned based on similar circumstances.

Reversals such as Garcia-Navarro's are rare, although part of the reason might be that defendants who are deported find it difficult to appeal convictions if they're back in their home countries and have few resources to launch an appeal.

The Appeals Court summary of the case doesn't make clear whether Garcia-Navarro actually was deported, but an attorney who represented him on his appeal told The Oregonian/OregonLive Wednesday that Garcia-Navarro was deported.

It's unclear if Garcia-Navarro has returned to the U.S.

If Garcia-Navarro is within U.S. borders, the Clackamas County District Attorney's Office in all likelihood would retry him. But if he's out of the country and remains there, there may be no point to prosecuting him again.

The ruling was made by a three-judge panel of the Appeals Court: Roger DeHoog, Erika Hadlock and Robyn Aoyagi.

-- Aimee Green