For the first time, the U.S. Supreme Court has ruled that defendants have a constitutional right to effective assistance of counsel in plea bargains. In a 5-4 decision Wednesday, the court went further, declaring that when a lawyer acts unethically or gives clearly wrong advice, the defendant may be entitled to a second chance at accepting a plea offer.

The court's ruling came in two cases. In one, Missouri college student Galin Frye was charged with a felony for a fourth offense of driving with a revoked license. The prosecutor sent Frye's lawyer a letter offering to reduce the charge to a misdemeanor if Frye would plead guilty and agree to a 90-day sentence. The lawyer, however, never informed his client of the offer, and when it expired, an uninformed Frye pleaded guilty with no conditions and was sentenced to three years in prison, more than 10 times the plea bargain offer.

In a second case, Anthony Cooper was charged with assault with intent to murder after he shot a woman in the thigh and buttocks. Prosecutors twice offered a plea deal with a recommended prison term of four to seven years, but Cooper's lawyer advised him to reject the offer, because the lawyer said Michigan law did not permit an attempted murder conviction for wounds below the waist. The advice was indisputably wrong and Cooper was tried, convicted and sentenced to three times as much prison time.

In both cases, the state conceded that the defense lawyers provided ineffective legal assistance to their clients. But the states contended that didn't matter since there is no constitutional right to a plea bargain. On Wednesday, however, the Supreme Court rejected that argument by a 5-4 vote.

'A System Of Pleas'

The reality is that for the most part, criminal justice today is "a system of pleas," said Justice Anthony Kennedy on behalf of the court majority. Ninety-five percent of all convictions are the result of plea bargains, not trials, and the right to adequate assistance of counsel guaranteed in the Constitution cannot exclude the "central role plea bargaining plays." For the most part, plea bargaining determines "who goes to jail and for how long. It is not some adjunct to the criminal justice system. It is the criminal justice system," Kennedy said.

The court then went on to fashion a remedy, telling the lower courts that consistent with state law, defendants should get a second chance to accept the original offer if they can show they very likely would have done so originally, that the prosecutor would not have withdrawn the offer, and that the judge would have approved it. Kennedy said that might be particularly difficult for Frye to do, since he was arrested for driving on a revoked license a fifth time just a week before his sentencing.

In an unusual oral dissent from the bench, Justice Antonin Scalia blasted the decision as "absurd."

Until this ruling, said Scalia, plea bargaining was "a somewhat embarrassing" part of the criminal justice system, "a necessary evil" to prevent the system from "grinding to a halt" if most cases went to trial.

The court's decision, he charged, seeks to ensure more than a constitutionally guaranteed fair trial. It "embraces the sporting chance theory of criminal law, in which the state functions like a conscientious casino operator, giving each player a fair chance to beat the house — that is to serve less time than the law says he deserves."

Surprising Breadth

Experts across the ideological spectrum were surprised by the breadth of the court's ruling. Kent Scheidegger of the Criminal Justice Legal Foundation said that in the Michigan case, the prosecution is getting the worst of both worlds.

"What it bargained for was avoiding trial, and that trial's already happened," Scheidegger said.

Robert Weisberg, a law professor at Stanford Law School, notes that it will often be difficult to put the genie back in the bottle after the fact.

"It's as if we have to erase history, forget that the defendant was convicted at a fair trial, and somehow reconstruct behind some veil of ignorance the original plea bargain to see if it would have gone down, and that's not easy," said Weisberg.

Rachel Barkow, director of the New York University Center on the Administration of Criminal Law, counters that she expects the courts will devise ways to deal with these problems, just as it has dealt with other new Supreme Court rulings in the past.

"This is a very practical court, and I think this is a court that says: Look, practically speaking, plea bargaining is where we need to be policing things," Barkow said. "This is for 95 percent of defendants. All those defendants have is their lawyer, and if their lawyer is deficient, then those defendants have nothing."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.