WHEN big social shifts happen in America, most people outside the corridors of Capitol Hill wonder what the response of the federal institutions will be. Washington’s politicos, by contrast, quickly set to thinking up a dozen reasons why fresh legislation should not be passed. Then, with surprising speed, something that hitherto looked impossible becomes the law of the land. The Supreme Court’s ruling on gay marriage, on June 26th, is the latest example of this.

America is a country that changes rapidly, governed by a set of national institutions with a bias towards inertia. A 50-year-old American was born into a world where some states had laws banning her from marrying a black man. Now she finds herself inhabiting one where she is allowed to marry a woman. In 2004 political consultants wondered whether John Kerry’s support of same-sex civil unions damaged his chances of becoming president; 11 years later, a rainbow was projected onto the White House to celebrate the court’s decision, and some pundits are wondering whether hostility to gay marriage will damage Republican chances in the next presidential election.

Views on gay marriage have shifted unusually quickly, but that is not an isolated example. In 2002 only 45% of Americans thought that having a baby outside marriage was morally acceptable, according to polling by Gallup. Now 61% do. Stem-cell research, one of the most controversial ethical questions during George W. Bush’s presidency, now has the backing of 64% of Americans. On climate change, where America has long been an outlier in the rich world, the country now looks less exceptional: 64% of adults support stricter limits on carbon emissions from power plants, according to polling by Pew, including half of all those who identify themselves as, or say they lean, Republican.

In another political system, these changes might result in new laws. In America’s, which combines the most energetic conservative movement found in any rich country with a proliferation of vetoes over federal legislation, they do not. This leads to a build-up of pressure in the tubes that connect Americans to their government. Increasingly, this pressure finds an escape through the Supreme Court, as the court’s most recent term shows.

In his tenth year as chief justice, John Roberts has presided over an unusually large bundle of important cases. As well as embracing gay marriage, the justices rescued Obamacare from a potentially fatal semantic glitch, rejected a challenge to a lethal-injection drug that seems to result in botched executions, scolded the Environmental Protection Agency for failing to consider costs before regulating power plants, clarified the meaning of racial discrimination under the Fair Housing Act, and allowed Arizonans to take action against partisan gerrymandering.

And that was just in the last five days of the term. Earlier the justices expanded the rights of pregnant women in the workplace, issued two rulings favourable to Muslims seeking accommodations for their religious views, told the feds to keep their hands off a Californian farmer’s raisins, clarified the rules when police stop drivers on the highway and reversed the conviction of a man who had threatened to kill his wife on Facebook.

The role of a judge, Mr Roberts told senators during his confirmation hearings in 2005, is that of an umpire who calls balls and strikes. That is true, he insisted, despite the public’s sense that the justices may be little more than politicians in robes. “I’m worried about people having that perception, because it’s not an accurate one,” Mr Roberts told an audience at the University of Nebraska last autumn. “It’s not how we do our work, and it’s important that we make that as clear as we can to the public. We’re not Republicans or Democrats.”

The Roberts court has indeed shown that the justices are willing to wander out of their ideological comfort zones. In February two liberal justices, Ruth Bader Ginsburg and Elena Kagan, found themselves on opposite sides of a dispute over John Yates, a fisherman who tossed overboard some fish he had caught which were smaller than the rules permitted. Justice Ginsburg held that because fish do not qualify as “tangible objects” under an evidence-tampering law passed in the wake of the Enron scandal, Mr Yates should not face up to 20 years in prison. Justice Kagan disagreed, writing that “a ‘tangible object’ is an object that’s tangible”.

There were other examples of unusual splits. In Zivotofsky v Kerry Clarence Thomas, the court’s most conservative justice, voted with Anthony Kennedy and the four liberals to expand presidential power in international diplomacy. In Walker v Sons of Confederate Veterans, Justice Thomas again departed from his fellow conservatives in allowing Texas to refuse to print a licence-plate emblazoned with the Confederate flag. This decision, when combined with the murder of nine blacks in a church in Charleston, South Carolina on June 17th, led to the swift removal of the flag—which had lingered on sentimentally for decades—not only from public places in the South but also from Walmart and eBay.

For the second time in three years, too, Mr Roberts gravely disappointed conservatives when he voted to save the Affordable Care Act (ACA), Barack Obama’s biggest legislative accomplishment and the target of more than 50 repeal attempts in the House of Representatives. The legal nub of the case, King v Burwell, was a mere four words in the 900-page law involving the allocation of tax credits to low- and middle-income Americans. These subsidies, the law reads, are for people buying policies through “exchanges established by the state”. But 34 states had left the job of setting up these marketplaces to the federal government. Were millions of Americans ineligible for support because their states had not set up their own exchanges?

No, Mr Roberts wrote. Though the plaintiffs’ interpretation of the four words might be the “most natural” reading, dropping the subsidies would make health insurance unaffordable for as many as 8m Americans, leading to fewer enrolments and higher premiums. The result, the chief justice wrote, would be a “death spiral” that would bring the law to a “calamitous” end. “Congress, he concluded, “passed the Affordable Care Act to improve health-insurance markets, not to destroy them.” Chief Justice Roberts, a natural pragmatist, had no interest in making his court appear overtly partisan. Yet that is how the rulings of this session have been received anyway. Ted Cruz, a former Supreme Court clerk and now a Republican presidential candidate, accused the court of lawless behaviour “that undermines [...] the very foundations of our representative form of government”. Kevin Williamson, writing in the right-wing National Review, declared that the decisions marked the moment of “peak leftism”. The greatest outrage, though, came from within the court in Obergefell v Hodges, the landmark 5-4 ruling that opened marriage to gays and lesbians nationwide. “Allow[ing] the policy question of same-sex marriage to be considered and resolved by a select, patrician, highly unrepresentative panel of nine,” wrote Antonin Scalia, the court’s chief conservative scourge, “is to violate a principle even more fundamental than no taxation without representation: no social transformation without representation.”

The public pulse

Unlike Congress, though, the Supreme Court is obliged to take a position when confronted by social change. Even the dissenting opinions in the gay-marriage decision showed a sensitivity to public opinion which some politicians lack. In his dissent in Obergefell, Chief Justice Roberts spoke directly to Americans, using conciliatory tones. “If you are among the many Americans—of whatever sexual orientation—who favour expanding same-sex marriage, by all means celebrate today’s decision,” he wrote. “Celebrate the achievement of a desired goal. Celebrate the opportunity for a new expression of commitment to a partner. Celebrate the availability of new benefits.” Were he a legislator, he went on, he “would certainly consider” the benefits of marriage equality “as a matter of social policy”. As a judge, however, he had to hold that the constitution demands nothing of the sort. “I have no choice,” he wrote, almost apologetically, “but to dissent.”

The Supreme Court rarely likes to get very far ahead of public opinion. Before issuing rulings giving rise to a major social change like the desegregation of public schools (Brown v Board of Education in 1954), the legalisation of interracial marriage (Loving v Virginia in 1967), or abortion (Roe v Wade in 1973) the justices seem to like at least half of Americans to be on board. In this light, the justices’ tones in the Obergefell opinions owe much to the environment into which they were released.

When he dissented from the pro-gay- rights holding in United States v Windsor in 2013, a ruling striking down the heart of the Defence of Marriage Act, Chief Justice Roberts included no words of support for the gay-rights advocates he was voting against. Same-sex marriage was legal then in only a dozen states. But the tide changed significantly over the ensuing two years. While he was writing his dissent in Obergefell, the number of states with gay nuptials had surged to 37 and popular support for gay marriage had reached 60%.

Next autumn, two racially charged cases await the justices. In Fisher v University of Texas (II), the court will rehear a challenge from a white woman who says the university violated the 14th Amendment when it rejected her because of race-conscious admissions criteria. And they will consider Evenwel v Abbott, a major case deciding whether Latino votes are “over-weighted” in Texan legislative districts. In either case it may become the turn of Democrats to denounce the court for judicial meddling.

The pattern of Congress leaving the court to rule on social changes that Congress cannot rouse itself to address is troubling for American democracy. But if the alternative is no change—which, given the political polarisation of the country, is highly probable—it is also hard to regret. The danger is that, relieved of responsibility for legislating on some of the most charged social questions, elected politicians are left free to posture without having to face the consequences of their positions, and the polarisation gets worse.