President Barack Obama's administration was unexpectedly on the winning side in nearly all the close, politically significant Supreme Court cases decided in the term that ended this week, including blockbuster rulings on Obamacare and gay marriage.
The run of victories ran counter to the administration's recent mixed record. It lost major cases at the hands of the conservative-leaning court in the two previous terms.
Solicitor General Donald Verrilli, the Democratic administration's top Supreme Court advocate, and his team of Justice Department lawyers successfully defended Obama's signature healthcare law from a conservative legal challenge and argued on the winning side of the court's ruling legalizing gay marriage nationwide.
They also successfully represented a Muslim woman who said she was denied a clothing retail sales job on religious grounds, and prevailed in a potentially fraught foreign policy question concerning the status of Jerusalem.
The Obama administration had 28 wins and 20 losses out of 66 cases the Supreme Court decided after hearing oral arguments.
These included cases in which the government was a direct party and those in which it participated in support of an outside party as in the gay marriage case.
The highlights for the administration were the court's 6-3 decision upholding key subsidies under the Affordable Care Act, widely known as Obamacare, and the landmark 5-4 ruling finding a constitutional right for same-sex couples to marry.
In numerical terms, the administration had a less impressive eight wins and 13 losses in cases in which it was a direct party. Many of the losses were on relatively minor issues, including several in criminal cases.
Jeffrey Wall, a lawyer in private practice who served in the solicitor general's office from 2008 to 2013, said Verrilli could be pleased with his office's performance not just because he won the blockbuster cases but also because the government "avoided any high-profile embarrassing losses."
The administration's biggest loss was a 5-4 ruling on the final day of the court's term on Monday that the Environmental Protection Agency should have considered compliance costs before issuing a rule to curb mercury air pollution.
In other cases of note the government lost, the court made it harder to prosecute people who make threatening statements online and ruled the Department of Agriculture has to compensate raisin farmers for their participation in a Depression-era agricultural program.
The government prevailed in 20 out of 27 cases in which it participated in support of another party, including the marriage case and a major civil rights case on discrimination in housing.
In the most important cases, the administration fared better than in previous years.
In the court's most recent terms, the overall win-loss numbers for the government were similar.
But it generally was on the losing side in at least one of the biggest cases, whether the 2013 civil rights ruling striking down a key provision of the Voting Rights Act or the 2014 decision that privately held companies can object on religious grounds to providing to their employees health insurance that includes contraception coverage.
The term that just ended is being described as the most liberal in years in terms of the outcome of the biggest cases, but it could be an anomaly.
The court led by conservative Chief Justice John Roberts has already taken up two cases, on affirmative action and public sector unions, that could give liberals reason to worry when the justices return for their new term in October.
"In another year or so, the luck of the draw may favor the right and then we'll be back to talking about 'that right-wing Roberts Court,'" said John Elwood, who served in the solicitor general's office during President George W. Bush's administration.