Defendants in criminal cases have a constitutional right to a competent lawyer’s advice when deciding whether to accept a plea bargain, the Supreme Court ruled, providing a significant expansion of rights that could have a broad impact on the justice system.

“Ours for the most part is a system of pleas, not a system of trials,” Justice Anthony M. Kennedy said for the majority in a pair of 5-4 decisions. Noting that about 97% of federal convictions and 94% of state convictions result from guilty pleas, Kennedy wrote that “in today’s criminal justice system, the negotiation of a plea bargain, rather than the unfolding of a trial, is almost always the critical point for the defendant.”

The ruling drew a sharply worded dissent from Justice Antonin Scalia, who took the unusual step of expressing his disagreement in the courtroom. He angrily called the court’s rulings a “judicially invented right to effective plea bargaining.”

The decisions were “a vast departure from our past cases” and would lead to endless litigation, he warned.

“Until today, no one has thought that there is a constitutional right to a plea bargain,” Scalia added.

Chief Justice John G. Roberts Jr. and Justices Clarence Thomas and Samuel A. Alito Jr. joined in dissent.

Until now, the vast majority of the high court’s decisions on the constitutional rights of criminal defendants had involved trials. Since plea deals are part of the daily routine in courthouses across the nation, expanding the Constitution’s reach into that arena could affect a large number of cases. But legal experts, like the justices themselves, differed on the precise impact.

“These are big and important decisions,” said Orin Kerr, a criminal law expert at George Washington University. “Plea negotiations have been mostly unregulated, and as a result, they have been informal. That will have to change, at least at the margins.”

Others said the justices did not want to second-guess routine plea deals, only those in which a lawyer’s blunder or clearly bad advice had caused his client serious damage.

Stanford law professor Jeffrey Fisher said the high court’s decision was significant because it put the “imprimatur of the Supreme Court” on the rule that defendants have a right to competent legal advice during negotiations over a plea deal. That position “is basically consistent with the predominant view in the lower courts over the past several years,” he said, but had not previously been declared a nationwide rule by the highest court.

Since the 1980s, the court has said defendants have a right to “effective assistance of counsel,” and this guidance is crucial to protecting the right to a fair trial.

On Wednesday, Kennedy joined with the court’s four liberals — Justices Ruth Bader Ginsburg, Stephen G. Breyer, Elena Kagan and Sonia Sotomayor — and made clear for the first time that a defendant’s right to a competent lawyer extends to decisions to accept or reject a plea offer from prosecutors.

Both cases involved men who were sent to prison for lengthy terms — one for assault and the other for drunk driving — who could have had much lighter sentences but for their lawyers’ mistakes.

No one suggested the attorneys must offer brilliant advice. Similarly, they cannot be faulted if their predictions about how a trial will go are proved wrong. But the lawyers must meet a standard of basic competence, the court said.

At minimum, Kennedy said, the lawyer has a duty to tell his client of any formal offers from a prosecutor that would result in a favorable deal.

In the drunk driving case, from Missouri, the lawyer had failed to tell his client that prosecutors had given him a written offer to recommend a 90-day sentence if the defendant pleaded guilty. The offer expired without the defendant, Galin Frye, being aware of it. Frye pleaded guilty and was sentenced to three years in prison.

“The court now holds that, as a general rule, defense counsel has the duty to communicate formal offers from the prosecution to accept a plea deal on terms and conditions that may be favorable to the accused,” Kennedy said in Missouri vs. Frye.

Whenever there is a “reasonable probability” that bad advice resulted in a longer prison term, the defendant is entitled to a new hearing or a lesser sentence, he added.

In the second case, from Michigan, Anthony Cooper was charged with attempted murder and was willing to admit his guilt. But, relying on advice from his lawyer, he turned down an offer from a prosecutor to plead guilty in exchange for a recommended sentence of between five and seven years in prison. His lawyer had told him he could not be convicted of intent to murder because he had fired a gun at a woman’s legs, not above her waist — an assertion that was flatly wrong, as a matter of law and common sense.

Cooper went to trial, the jury convicted him on all counts, and he was sentenced to between 15 and 30 years in prison. In Lafler vs. Cooper, the court agreed that the defendant had been denied his right to a competent attorney and sent the case back to a Michigan judge to decide on a new sentence.

The Obama administration and lawyers for 32 states had essentially agreed with Scalia’s view. They took the position that if a defendant chooses to plead guilty or is convicted in a fair trial, he has no right to object about earlier bad advice from a lawyer.

Lawyers for the Constitution Project lauded the decisions for recognizing the reality of America’s criminal justice system. Since plea deals have largely replaced jury trials, “we are pleased the court has recognized that the right to counsel during plea negotiations is just as important as at trial,” said Virginia Sloan, the group’s president.

david.savage@latimes.com