The conservative-majority U.S. Supreme Court, with Chief Justice Roberts leading the way, has distinctly staked out its independence from President Donald Trump by delivering a series of setbacks to him and his administration in pivotal cases.
The court ended its nine-month term on Thursday by rejecting Trump's sweeping assertions of presidential immunity in a ruling that paves the way for a New York prosecutor to obtain the president's financial records, which he has sought to conceal. The court also rejected Trump's broad arguments for preventing Congress from obtaining similar records and sent the matter back to lower courts for further consideration.
Those rulings were only the latest setbacks for the Republican president in the past month from a nine-member court that until this term generally backed him in big cases.
The court also ruled against Trump in blocking him from rescinding an immigration program created by his Democratic predecessor Barack Obama, in expanding LGBT rights and in striking down a restrictive Louisiana abortion law defended by his administration.
Roberts was in the majority in all of those rulings. The chief justice, who served in the largely ceremonial role of presiding officer in Trump's Senate impeachment trial in February, is known for his concern about the court's reputation as an institution led by law and not politics.
"Roberts certainly has an interest in the court appearing independent and being independent," Chicago-Kent College of Law professor Carolyn Shapiro said.
That tendency was on display in the abortion ruling, Columbia Law School professor Gillian Metzger said.
In 2016, the court struck down a Texas law placing restrictions on doctors who perform abortions that was very similar to the Louisiana law. Roberts dissented in the ruling that invalidated the Texas law, but wrote the ruling that struck down Louisiana's, emphasizing the importance of respecting the court's precedents.
Overturning the 2016 ruling would have harmed the court's reputation, Metzger said.
"He has shown a real willingness to take the court's institutional integrity to heart this term," Metzger added.
It was noteworthy in Thursday's rulings on Trump's financial records that both of the justices he has appointed - Brett Kavanaugh and Neil Gorsuch - voted against him.
"Once a Supreme Court justice gets appointed, they have life tenure and can do what they want, rather than what the people who appointed them want them to do," said Harry Sandick, a former federal prosecutor in Manhattan.
The bad run for Trump began on June 15, when the court ruled 6-3 - with Gorsuch and Roberts joining the four liberal justices - that federal law protects gay and transgender workers from employment discrimination.
Three days later, Roberts joined the liberals in a 5-4 ruling that thwarted Trump's plan to end a program that protects hundreds of thousands of immigrants who had lived in the United States illegally after entering as children - the so-called Dreamers.
On June 29, Roberts again joined the liberals in the 5-4 decision on Louisiana's abortion law.
With its 5-4 conservative majority, Trump allies had reason to expect smoother sailing at the court, which gave him some big victories earlier in his administration including upholding his travel ban targeting people from several Muslim-majority nations and allowing his ban on most transgender troops.
The recent losses have prompted both Trump and his supporters to grouse about the court.
"Do you get the impression the Supreme Court doesn't like me?" Trump asked on Twitter after the Dreamers ruling.
More conservative justices
On Thursday, White House Press Secretary Kayleigh McEnany said the takeaway from the recent rulings was that "we need more conservative justices on the courts."
If Trump wins re-election on Nov. 3, he may get a chance to do just that, considering that two of the liberal justices are octogenarians: Ruth Bader Ginsburg (87) and Stephen Breyer (81).
As a candidate in 2016, Trump attracted conservative Christian voters by promising to appoint conservatives to the federal judiciary. Those voters, motivated by a desire to see the court's 1973 Roe v. Wade ruling that legalized abortion overturned, remain a key part of his political base.
Roberts and some of his colleagues may be keeping a close eye on the court's reputation during an election year.
Many of the recent decisions forged by Roberts "have, rather skillfully, taken the court out of center stage in the election," Shapiro said.
Trump and his conservative allies certainly have not come up emptyhanded this term, with the court delivering important decisions favoring conservative policies, including a trio backing religious rights.
The court also handed a victory to conservatives critics of the federal bureaucracy in a ruling making it easier for the president to fire the head of the Consumer Financial Protection Bureau, an agency created under Obama.
Of 60 rulings this term, only 12 ended up 5-4, illustrating that some justices seek consensus when possible. The Trump financial records cases were both 7-2 votes.
"There is a desire," said William Jay, a lawyer who argues cases at the court, "to not have everything be a sharp-edged split between five on one hand and four on the other."