WASHINGTON--The Supreme Court on Wednesday held that defendants who plead guilty retain the right to challenge their convictions as unconstitutional, frustrating prosecutors who said the rule would inject uncertainty into a criminal justice system built on plea bargains.

The 6-to-3 vote upset the court’s ideological alliances, as Justice Neil Gorsuch joined Chief Justice John Roberts and four liberal colleagues in the majority. The decision allows a North Carolina man who pleaded guilty to bringing loaded weapons onto the U.S. Capitol to pursue an appeal contending he had a Second Amendment right to do so.

Justice Stephen Breyer, writing for the majority, offered no prediction on how the claim might fare on appeal. But as a general rule, he said, while a guilty plea admits the prosecution’s factual allegations and forecloses most appeals, it does not necessarily concede that the crime the government charged is constitutional.

That principle, Justice Breyer wrote, traces at least to the 1860s, when the Massachusetts high court held that a guilty plea admits the facts “and also the evil intent imputed to the defendant,” waiving “technical and formal objections” to the conviction. “But if the facts alleged and admitted do not constitute a crime...the defendant is entitled to be discharged,” the state court wrote.

The U.S. Supreme Court, Justice Breyer wrote, itself embraced that view in a line of precedents dating back 50 years.


Justice Samuel Alito dissented, joined by Justices Anthony Kennedy and Clarence Thomas.

“There is no justification for the muddle left by today’s decision,” Justice Alito wrote. “Roughly 95% of felony cases in the federal and state courts are resolved by guilty pleas. Therefore, it is critically important that defendants, prosecutors and judges understand the consequences of those pleas.”

Justice Gorsuch foreshadowed his vote at oral argument in October, when he sharply questioned a Justice Department attorney who suggested that defendants might play a kind of bait-and-switch on plea bargains that put prosecutors at a disadvantage.

Was the Justice Department arguing that “the government lacks sufficient bargaining power in the plea bargaining process?” Justice Gorsuch asked at the time, with evident skepticism.


The defendant in the case, Rodney Class, may find it tougher to prevail on his appeal. The High Shoals, N.C., retiree was arrested in May 2013 after Capitol Police investigating his illegally parked Jeep Wrangler found several loaded weapons, including a 9mm Ruger pistol, a .44-caliber Taurus pistol and a .44- caliber Henry rifle. Federal law prohibits guns on the Capitol grounds.

The government said Mr. Class told FBI agents that “he was a ‘Constitutional Bounty Hunter’ and a ‘Private Attorney General’ who traveled the nation with guns and other weapons to enforce federal criminal law against judges whom he believed had acted unlawfully.”

Under a plea bargain, Mr. Class was sentenced to 24 days’ imprisonment and a year of supervised release.

Justice Gorsuch proved no friend to criminals in a separate case decided Wednesday, writing a majority opinion that could cut the damages inmates can keep after prevailing in prison-abuse lawsuits.


Charles Murphy, an inmate at the Vandalia Correctional Center in Illinois, sued guards who beat him and left him stripped and unattended with a crushed eye socket for more than 30 minutes. He sued and won about $300,000; the trial court awarded his attorney a fee of $110,000.

At issue was how much of that fee would come from Mr. Murphy, under a federal law that caps the prisoner’s contribution at 25% of his award, leaving the defendant guards to pay the rest.

Splitting 5-to-4 along the traditional conservative-liberal divide, the justices said a trial judge erred in ordering Mr. Murphy to pay only 10% of his award. Instead, they found that the prisoner must pay the full 25% before the guards would have to contribute.

Justice Sonia Sotomayor wrote the dissent, concluding that the statute gave trial judges discretion in apportioning the prisoner’s share of the fee up to 25%.


Write to Jess Bravin at jess.bravin@wsj.com