The Supreme Court has its highest public approval rating in a decade, according to a new Gallup poll, after a consequential term in which both liberals and conservatives could claim wins.

The approval rate of 58 percent is the highest since 2009, the polling organization said.

At a time when partisan divides are starker than ever, perhaps the most significant finding is that almost equal majorities of Democrats (56 percent), Republicans (60 percent) and independents (57 percent) approve of the court’s performance.

Part of the reason for those numbers, though, is a significant drop in GOP approval of the court since the organization polled on the question last year, and an even greater increase in the number of Democrats who think the justices do a good job.

It is the first time since President Trump took office that a majority of Democrats have had a favorable opinion of the court. Perhaps that is because the administration suffered a number of setbacks at the court this term, including findings that Trump is not immune from answering subpoenas from congressional investigators and a state prosecutor regarding his personal financial records.

The president tweeted in mid-June after one adverse ruling: “Do you get the impression that the Supreme Court doesn’t like me?”

Chief Justice John G. Roberts Jr., who presided over Trump’s impeachment trial in the Senate earlier this year, has gone out of his way to try to present the court as independent of the partisan gridlock that has gripped the political branches.

Roberts was in the majority of every major decision the court made in an election-year term filled with controversial issues. It found LGBTQ workers were protected by a federal anti-discrimination law; stopped the Trump administration from dismantling a program protecting undocumented immigrants brought to the United States as children; and struck down a restrictive abortion law in Louisiana. It declined to take up challenges to gun-control laws.

Those high-profile decisions largely track public opinion surveys. While the court is supposed to base its opinions on the law, a term in which the public thinks each side has been served is the kind of outcome Roberts would like to see.

Moreover, the decision on workers was written by Justice Neil M. Gorsuch, one of the court’s most stalwart conservatives, and Justices Stephen G. Breyer and Elena Kagan joined “the other side” in two cases important to religious conservatives.

The Gallup bottom line — 58 percent approve of the court’s performance, 38 percent disapprove and 4 percent had no opinion — is similar to other polls conducted this summer.

A Fox News poll from July found 54 percent of Americans approving of the job the Supreme Court was doing and 31 percent who disapproved (15 percent said they did not know).

A Quinnipiac poll also from July found 52 percent of registered voters approving of how the Supreme Court was handling its job and 37 percent disapproving (10 percent had no opinion).

It also asked people to rate the Supreme Court by ideology: 36 percent said it was “too conservative,” 19 percent said it was “too liberal” and 37 percent said it was “about right.”