A convicted drug trafficker from Honduras who won a 2010 U.S. Supreme Court ruling will get a new trial after a state appeals court overturned his conviction because his attorney gave bad advice about deportation.

The Kentucky Court of Appeals on Friday ordered a new trial for Jose Padilla, a native of Honduras and permanent legal resident of the United States. Judge Kelly Thompson wrote for a three-judge panel that Padilla's attorney improperly told him that deportation wouldn't be a concern when he pleaded guilty to transporting 1,000 pounds of marijuana.

Thompson concluded that because Padilla wasn't properly informed about possible deportation, his decision to accept a guilty plea and five-year prison sentence wasn't rational.

"There was substantial evidence that had Padilla been properly informed that if he pleaded guilty he faced mandatory deportation, he would have insisted on going to trial," Thompson wrote. "Under the circumstances, his decision would have been rational."

The attorney's advice became central to the U.S. Supreme Court's decision in 2010, in which it concluded that the attorney's advice was unconstitutionally bad. The case has made an impact on plea agreements and immigration cases around the country.

The high court at the time did not decide whether the ruling would apply retroactively, sending the case back to Kentucky for a determination about whether Padilla would be allowed to benefit from the case.

Padilla, a U.S. military veteran who received an honorable discharge after serving in Vietnam, was driving 32,000 pounds of cargo from California to Illinois. For unexplained reasons, he passed through Kentucky and was stopped in Hardin County, near Elizabethtown. A police search of his truck turned up 23 boxes of marijuana stacked near the rear of his load.

After being told that deportation wasn't an issue, Padilla agreed to the guilty plea. Only later, after being paroled from state prison, did Padilla learn he was going to be returned to Honduras.

Hardin Circuit Judge Kelly Easton ruled that Padilla made a reasonable decision to take a plea, despite the errant advice from his attorney. Padilla appealed, hoping to withdraw the guilty plea and work out a deal that wouldn't result in deportation.

Thompson found that Padilla had several valid defenses he could have used with proper attorney advice.

Thompson ruled that Padilla could still be convicted and deported to Honduras, which would take him away permanently from family living in California.

"However, for Padilla, exile is a far worst prospect than the maximum ten year sentence," Thompson wrote.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino