A federal judge has ordered resentencing for a Chinese immigrant, saying he was deprived of effective legal assistance because his attorney should have informed the court that mandatory deportation would accompany any prison sentence of more than a year.

“While counsel did apprise the court that [Shu Feng] Xia faced deportation, he characterized that prospect as certain, leading the court to believe that the exercise of its discretion in imposing sentence had no bearing on the likelihood of Xia’s deportation,” Southern District Judge Ronnie Abrams wrote Monday in Xia v. United States, 14-cv-10029.