Hundreds of thousands of non-citizens face immigration consequences for prior criminal convictions. These consequences affect legal and illegal immigrants alike, and can include deportation, denial of re-entry and denial of the chance for naturalization to the United States.
An area of criminal law exists that involves efforts to go back and modify, and sometimes vacate, these convictions. Lawyers generally call this post-conviction relief. Sometimes this involves seeking retroactively to reduce or change sentencing. An aggravated felony, for example, triggers immigration consequences when the sentence is for 365 days or longer. Modifying a sentence to, say, 364 days can sometimes stop a person's deportation.
But the most common form of post-conviction relief is a motion to vacate a prior conviction. And the most common basis for the motion is failure to advise the defendant of immigration consequences. The attorney will try to convince the court that at the time the client accepted a plea bargain and pled guilty or no contest, he was not apprised of the immigration ramifications. Had he been, he would not have entered the deal.