A defendant can withdraw a guilty plea that a judge hasn’t yet accepted. Also, defendants who have pleaded but not yet been sentenced can sometimes get out of their deals, particularly when the judge rejects the negotiated agreement pursuant to which the defendant pleaded.
After sentencing, the trial judge will typically set aside a conviction and allow plea withdrawal only if it’s necessary to avoid an obvious injustice. It’s not enough, say, that the prosecution agreed to and did recommend a certain sentence as part of a plea deal, but the judge imposed a longer one. After all, the judicial system prioritizes efficiency, and rehashing cases is no way to speed the docket along. In addition, judges entertaining plea withdrawals are supposed to consider their prospective effect on the prosecution. If, for instance, the prosecution lost contact with witnesses who were necessary for trial between the time of the plea and the attempted plea withdrawal, the judge might deny the defendant’s request.
There are, however, instances in which judges can—and must—allow defendants to withdraw their pleas.
Indeed, they are required to set aside guilty pleas (even absent a defendant’s request) when they receive an indication that a defendant isn’t guilty or didn’t fully understand the charges or the effects of admitting guilt.
Likewise, certain factors support, but don’t mandate, a judge allowing withdrawal of a guilty plea. One of the circumstances in a defendant’s favor is lack of counsel: Not having legal representation when pleading guilty is a fact tending to support subsequent withdrawal. Another favorable circumstances is lack of voluntary plea or not being advised or immigration consequences. Additionally, finding new evidence and/or ineffective assistance of counsel is another factor to be considered for withdrawing a plea.