Former President Donald Trump had a very good year at the Supreme Court. On Monday, the court ruled that he is substantially immune from prosecution on charges that he tried to subvert the 2020 election.

On Friday, the court cast doubt on two of the four charges against him in what remains of that prosecution. And in March, the justices allowed him to seek another term despite a constitutional provision barring insurrectionists from holding office.

Administrative agencies had a horrible term. In three 6-3 rulings along ideological lines, the court’s conservative supermajority erased a foundational precedent that had required courts to defer to agency expertise, dramatically lengthened the time available to challenge agencies’ actions and torpedoed the administrative tribunals in which the Securities and Exchange Commission brings enforcement actions.

The court itself had a volatile term, taking on a stunning array of major disputes and assuming a commanding role in shaping American society and democracy.

If the justices felt chastened by the backlash over their 2022 abortion decision, the persistent questions about their ethical standards and the drop in their public approval, there were only glimmers of restraint, notably in ducking two abortion cases in an election year.

The court was divided 6-3 along partisan lines not only in Monday’s decision on Trump’s immunity and the three cases on agency power, but also in a run of major cases on homelessness, voting rights, guns and public corruption.

Also read | Giuliani loses New York law license after backing Trump’s false 2020 election claims

An unusually high proportion of divided decisions in argued cases — more than two-thirds — were decided by 6-3 votes. But only half of those decisions featured the most common split, with the six Republican appointees in the majority and the three Democratic ones in dissent.

The justices reached unanimous or lopsided rulings in other major cases, including ones letting abortion pills remain widely available, allowing the government to disarm domestic abusers, restoring Trump to the Colorado ballot, endorsing the National Rifle Association’s First Amendment rights and rejecting a challenge to the Consumer Financial Protection Bureau.

Irv Gornstein, executive director of Georgetown’s Supreme Court Institute, said the court’s liberals by some measures had a good term.

“But most of those wins are an artifact of so many cases coming from the law-free 5th Circuit,” he said, referring to the federal appeals court based in New Orleans. “The judges in that circuit seem to have some kind of competition to see who can write the most precedent-twisting, common-sense-defying decision.”

Pamela Karlan, a law professor at Stanford University, agreed, saying that “the 5th Circuit is making the Supreme Court seem more moderate than it is.”

Even when the justices agreed, though, they very often could not find consensus on the rationale. Indeed, they issued concurring opinions at a record rate, the highest since at least 1937 and probably ever. Some of those opinions revealed fractures on the right, particularly on the role history should play in constitutional interpretation.

Gregory G. Garre, a lawyer with Latham & Watkins who served as US solicitor general in the administration of George W. Bush, said that “there are signs of dysfunction” among the justices.

“The court is taking an extraordinarily small number of cases,” he said, “and taking an extraordinarily long time to decide them. And the justices are writing more and more individual opinions to express their own views. This is especially pronounced on the right side of the court and has to create some friction among the justices.”

There was a sense of disarray as the term ended. On Wednesday, the court briefly posted and then promptly withdrew an abortion decision that would not be formally issued until the next day.

On Thursday, it made 13 separate corrections to four sets of opinions. In one of them, blocking a Biden administration plan to combat air pollution, Justice Neil Gorsuch had repeatedly referred to nitrogen oxide as nitrous oxide.

Also read | Trump to seek overturn of NY hush money conviction after immunity ruling: Report

That confusion, Karlan said, “would be just funny (in a laughing-gas sort of way) if the court weren’t simultaneously kneecapping expert agencies that do know the difference.”

A look at how individual justices voted in divided cases issued after oral arguments brings trends at the court into sharp relief, according to data compiled and analyzed by Lee Epstein and Andrew D. Martin, both of Washington University in St. Louis, and Michael J. Nelson of Penn State.

By that measure, the court is extraordinarily polarized. Two of the four most conservative justices to serve since 1937 are on the current court: Justices Clarence Thomas and Samuel Alito. (The others were Chief Justices William H. Rehnquist and Warren E. Burger.)

In that same time span, two of the five most liberal justices are currently sitting: Justices Sonia Sotomayor and Ketanji Brown Jackson. (The others were Justices Thurgood Marshall, William J. Brennan Jr. and William O. Douglas.)

Overall, in divided cases argued in the last term, Democratic appointees voted for a liberal result 83% of the time and Republican ones 33% of the time a 50 percentage point gap.

Chief Justice John Roberts’ leadership of the court was called into question in 2022 by his lonely concurring opinion in Dobbs v. Jackson Women’s Health Organization, one in which he failed to persuade any of his five conservative colleagues to join him in restricting but not eliminating the constitutional rights to abortion.

Two years later, things are looking up for the chief justice. He assigned himself an unusually large proportion of the term’s majority opinions in the biggest cases, including the ones on Trump’s immunity from prosecution, the Jan. 6 prosecutions, the Second Amendment, the Chevron doctrine and administrative tribunals.

The chief justice was in the majority in divided cases 94% of the time, more than any other member of the court and tying his own record in the term that ended in 2020. No other chief justice since at least 1953 has been in the majority. as often.

But it is Justice Brett Kavanaugh who has been setting the pace over time. Since he joined the court in 2018, he has been in the majority 89% of the time, a higher rate than any justice since at least 1953.

It was not long ago that some heralded Thomas as the court’s true leader, but this term’s data rebuts that idea. He was, for instance, in the majority in divided cases just 63% of the time.

Last term, Alito was part of the pair most likely to disagree, voting with Justice Elena Kagan just 21% of the time. This term, Thomas was part of both pairs most likely to disagree, voting with Sotomayor and Kagan just 9% of the time.

At the other end of the spectrum, the two justices most likely to vote together were members of the court’s liberal wing, Kagan and Sotomayor, at 94%.

Also read | What to know about US Supreme Court’s immunity ruling in Trump’s 2020 election interference case

A look at the three justices most apt to vote together in divided cases confirms two bits of conventional wisdom and dispels a third. The court’s three liberals — Sotomayor, Kagan and Jackson — voted together 81% of the time, more than any other combination of three justices. They were trailed by three Republican appointees often said to represent the court’s middle — Roberts, Kavanaugh and Justice Amy Coney Barrett — at 75%.

But agreement among the remaining three justices, who are often lumped together as the court’s hard-right wing — Thomas, Alito and Gorsuch — was much lower, at 59%. That refutes the story of a 3-3-3 court and highlights Gorsuch’s independence.

Indeed, he voted for liberal results in divided cases 45% of the time, often siding against the government and in favor of powerless litigants. Since he joined the court in 2017, he has voted for the government just 35% of the time, the lowest rate of any member of the court.

When Thomas and Alito were both in the majority in divided cases, Gorsuch voted with them less often than any other member of the court’s conservative wing.

Put another way, none of the three members of the court appointed by Trump are as conservative as Thomas and Alito.

Barrett, the third Trump appointee, is particularly worth watching, Epstein said. “Some indicators show that Barrett — though still way more conservative than her predecessor, Ruth Bader Ginsburg — is moving somewhat to the left,” she said. “This term she overtook Roberts as the Republican appointee casting the highest percentage of liberal votes in divided cases.”

Trump has expressed disappointment with his choices, and he may be inclined to nominate more extreme justices, perhaps drawing from the 5th Circuit, should he gain another term. The four oldest members of the court are Thomas, 76; Alito, 74; Sotomayor, 70; and Roberts, 69.

While Trump was president, his administration did quite poorly in the Supreme Court in signed decisions in orally argued cases in which the United States, an executive department, an independent agency or the president himself was a party, prevailing only 42% of the time, the lowest rate since at least Franklin D. Roosevelt’s administration. The Biden administration, by contrast, has been on the winning side 54% of the time.

The term that ended Monday was studded with more potential blockbusters than any in recent memory. The court defused a few of them, but the term ended with a series of earth-rattling explosions.

When the justices return in October, they will face what is, for now at least, a more usual docket. Among the cases the court has agreed to decide are ones on transgender care for minors and so-called ghost guns.

There is little reason to think the court will find consensus in those cases.

Garre said the quarrels among the justices, and particularly the conservative ones, called to mind a remark ascribed to Justice Oliver Wendell Holmes Jr., who is said to have compared the Supreme Court with “nine scorpions in a bottle.”

“Chief Justice Rehnquist once described the job of chief as akin to herding cats,” Garre said. “To pick up on Holmes’ saying, maybe the better analogy these days is herding scorpions.”