Current Supreme Court justices are, seated from left, Ruth Bader Ginsburg, Anthony M. Kennedy, Chief Justice John G. Roberts Jr., Clarence Thomas, Stephen G. Breyer, and, standing from left, Elena Kagan, Samuel A. Alito Jr., Sonia Sotomayor and Neil M. Gorsuch. (Matt McClain/The Washington Post)

Five protesters who disrupted a session of the U.S. Supreme Court by shouting disapproval of its rulings on campaign finance law were sentenced to one or two weekends in prison Monday after losing a bid to overturn a 1949 law restricting public protest at the court.

U.S. prosecutors had asked U.S. District Judge Christopher R. “Casey” Cooper in Washington to order 10-day jail sentences for the defendants, members of an organization called 99Rise. They had stood and spoken one-by-one just after the court was gaveled into session April 1, 2015, about a year after the justices had struck down overall limits on campaign contributions.

“Money is not speech. One person, one vote!” shouted defendant Matthew Kresling, 43, of Los Angeles, before being led away in 2015. David Bronstein, 30, of the District, sang, “We who believe in freedom shall not rest.” A third defendant demanded that the court overturn its campaign finance decision in Citizens United v. Federal Election Commission.

Cooper said that he appreciated the defendants’ commitment, public participation and community contributions and that the sentence had nothing to do with their views or exercise of free speech, only “how, where and when” they exercised that right.

A 2010 file photo of the Supreme Court justices. Seated, from left are, Justice Clarence Thomas, Antonin Scalia, Chief Justice John Roberts, Justice Anthony Kennedy, and Justice Ruth Bader Ginsburg. Standing, from left are, Justices Sonia Sotomayor, Stephen Breyer, Samuel Alito Jr., and Elena Kagan. (Pablo Martinez Monsivais/AP)

“Courtrooms are special public forums,” Cooper said, drawing power and legitimacy not from police powers or the power of the purse such as the other branches of government, but from what Cooper described as the “law and mutual respect” of the judicial process.

The Supreme Court embodies the “legitimacy and independence of the federal judiciary, and that legitimacy is undermined when rules and traditions are flouted, even for a cause that you believe is just,” the judge said.

Cooper also said that the same group behind the protest, now known as Democracy Spring, had disrupted the court three times over a period of about a year and that defendants in the first two cases were not sentenced to additional jail time.

In seeking jail time, Assistant U.S. Attorney Lisa Nicole Waters called politically-charged speeches and “theatrics” a threat to the justice system’s integrity and impartiality.

Jail time “will promote respect for the law because it will send a clear message that this type of disruptive, uncontrollable conduct will not be tolerated,” Waters wrote in court filings.

Immediately after the protests, a court audio recording captured Chief Justice John G. Roberts Jr. saying, “Oh, please,” and Associate Justice Antonin Scalia grumbling, “Give them stiff, stiff sentences.”

Defendants, who pleaded guilty May 4, had asked to be sentenced to the 30 hours of jail time they had served after their arrest, and after Monday’s sentencing voiced sentiments ranging from relief to irritation at the government resources spent on the case against them.

Cooper sentenced Kresling to two weekends in prison citing an additional recent arrest at a protest at a Pennsylvania state lawmaker’s office. The four others each received a sentence of one weekend. All five were ordered to stay away from the Supreme Court for one year.

In a statement he posted online and read in court, Kresling called it a paradox that the law the protesters were charged with violating was written to prevent groups such as the Ku Klux Klan from attempting to intimidate courts and juries.

By contrast, he said, he and his friends intended to speak out for average citizens who now think American democracy is rigged by a controlling, moneyed elite of wealthy donors.

“If we’d truly wished to intimidate the court, everyone knows that the best way to do it would have been to make massive contributions, in one form or another, to a politician who would subsequently make or approve judiciary appointments favorable to our interests,” Kresling wrote in his prepared statement. “That’s how modern Klans, in their various guises, influence the court in our time, when money is speech and mere speaking, apparently, is criminal.”

Kai Newkirk, organizer of Democracy Spring, said after the sentencing that the group has no current plans to disrupt the high court but will continue nonviolent protests to encourage Americans to take actions with their legislatures to pass reforms of campaign finance and voting access laws.