When Chief Justice John G. Roberts Jr. joined with the court’s liberal justices to uphold President Obama’s health-care law, it was historic in more ways than one: It was only the second time in his seven years on the court that he provided the winning vote for the left to prevail over the conservative justices.

That statistic alone should be enough to cool hopeful chatter from some liberal political commentators that perhaps Roberts is showing signs of becoming the next David H. Souter. Souter, nominated to the court in 1990 by President George H.W. Bush, eventually became a fairly reliable liberal vote.

But it does point to another fact about the Supreme Court term that ended last week: In cases that divided the court into its usual ideological camps, liberals were in the majority as often as conservatives.

Justice Anthony M. Kennedy, who normally provides the decisive vote when liberals and conservatives disagree, sides about two-thirds of the time with conservatives. This term, according to statistics at SCOTUSblog, he split the difference evenly.

And on the two issues most likely to define the court’s term — health care and Arizona’s get-tough law on illegal immigration — liberal justices Ruth Bader Ginsburg, Stephen G. Breyer, Sonia Sotomayor and Elena Kagan were in the majority.

The limit of federal power was the overarching theme of the court’s deliberations this term, and it delivered a mixed verdict.

Kennedy and Roberts parted ways with conservatives Antonin Scalia, Clarence Thomas and Samuel A. Alito Jr. in the Arizona case. Kennedy’s majority opinion was a solid affirmation that the federal government must play the preeminent role in immigration policy and that states must be careful in trying to supplement it.

“Arizona may have under­standable frustrations with the problems caused by illegal immigration,” Kennedy wrote. “But the state may not pursue policies that undermine federal law.”

The health-care ruling, like the immigration decision, was an important political win for the Obama administration. But it came with new restrictions on federal authority. Roberts and Kennedy joined the other conservatives in saying the requirement that almost all Americans must buy health insurance was not constitutional under Congress’s authority to regulate interstate commerce.

“The Commerce Clause is not a general license to regulate an individual from cradle to grave,” Roberts wrote, although he found the individual mandate constitutional under Congress’s taxing authority.

Ginsburg said the Commerce Clause finding was disturbing.

“Since 1937, the court has deferred, as it should, to Congress’ policymaking in the economic and social realm,” she said in a dissent read from the bench.

And seven members of the court, all but Ginsburg and Sotomayor, said there are limits to how coercive Congress may be when conditioning federal payments to the states on requirements the states must perform.

Stanford University law professor Pamela Karlan said Roberts’s health-care compromise was “certainly designed to make the court look less political. But in fact it is setting the seeds for the future.”

Another case, testing the Federal Communications Commission’s continued authority to police the broadcast airwaves, ended in something of a fizzle. Despite extensive briefing on the subject, the justices passed on deciding whether the commission’s regulations violated the First Amendment, essentially giving the agency a chance to come up with new and clearer regulations.

Liberals were on the prevailing side in several key criminal justice cases.

The court extended its line of cases requiring courts to treat juvenile offenders different from adults by banning mandatory life sentences even if the conviction is for murder. By a separate 5 to 4 vote, it extended the right to effective counsel to plea offers, recognizing that only a small percentage of criminal cases go to trial.

And Kennedy joined the liberals to rule that Congress intended more lenient sentences it created for crack-cocaine offenders to apply even for some of those who committed their crimes before the law was signed.

Those victories hardly make a trend. According to the SCOTUSblog numbers, Kennedy and Roberts were most likely to be in the majority, while Ginsburg and Breyer were the least likely.

In some controversial cases, the court was united.

It decided unanimously that religious organizations have broad freedom to choose those who carry out their faith missions and that federal discrimination laws do not apply when the organizations fire some employees.

All nine voted that those accused of violating some Environmental Protection Agency standards have an immediate right to challenge the findings in court.

And all agreed government prosecutors needed a valid warrant to use a Global Positioning System device on a suspected drug dealer’s vehicle to track his whereabouts for a month. It was the first of what will probably be more decisions on how modern technology coexists with privacy rights.

The lineups suggest that the court “is more dynamic and complex” than many believe when consigning the justices to “liberal and conservative molds,” said Gregory G. Garre, solicitor general under President George W. Bush.

Such roles will be questioned again next term, as the court is expected to consider a host of politically divisive issues, such as affirmative action in college admissions and challenges to voting laws and the Voting Rights Act.

Just as justices were finishing their work Friday, they received a petition asking them to review lower court decisions that declared the Defense of Marriage Act unconstitutional. It denies federal recognition of same-sex marriages performed in those states where it is legal.

“Controversy has a way of finding the court,” said Steven R. Shapiro, national legal director of the American Civil Liberties Union. “And next term is shaping up to be another blockbuster year.”