The U.S. Supreme Court declined on Wednesday to apply retroactively a 2010 ruling that requires lawyers to tell immigrant clients that they can be deported if they plead guilty to certain crimes.

The 7-2 decision was a defeat for thousands of immigrants who might have been able to withdraw guilty pleas in cases alleging ineffective counsel.

These cases predated the court's March 2010 ruling in Padilla v. Kentucky that immigrants should be told some consequences of guilty pleas.