President Obama sings “Amazing Grace” during the eulogy of slain South Carolina State Senator Clementa Pinckney. (Richard Ellis/Euopean Pressphoto Agency)

Sometimes history speeds up. Rarely in our nation’s 239 years of life has a single week brought such a surge of social change and such a sweeping set of challenges to past assumptions.

The move against the Confederate battle flag in South Carolina quickly cascaded into a national effort to cast aside commemorations of secession, slavery and white supremacy. This was more than symbolism. It represented something bigger — the nation’s turn toward “thoughtful introspection and self-examination,” as President Obama put it in his powerful eulogy for the Rev. Clementa Pinckney on Friday.

For years, the fact that slavery was the central cause of the Civil War was swept under a rug woven of heritage and battlefield glory. Confederate emblems that came into wide public use in the 1950s and 1960s in large part to protest racial equality and civil rights were treated as if they had always been there, representing a “tradition” kept vague enough to hide away slave labor, disenfranchisement and murderous night riders.

On Thursday, the Supreme Court decided, 6 to 3, to keep the Affordable Care Act whole. To go the other way, as Chief Justice John G. Roberts Jr. rightly argued, would have violated any plausible understanding of what Congress had intended. Roberts’s reasoning was rooted, ironically, in the principles of interpretation put forward by Justice Antonin Scalia. This did not stop Scalia from offering a scalding dissent that gave the nation a vocabulary lesson when he condemned “interpretive jiggery-pokery.”

Yet if the King v. Burwell case was about a textual dispute, its implications were much broader. In principle, there are no irreversible changes in a democratic republic because everything is always subject to popular review. In practice, some reforms do become irreversible as they are accepted by overwhelming majorities as necessary and normal. Obamacare has not quite reached this point, but it is now on the road to joining Medicare and Social Security as fixtures of social policy.

And the next day, the court made same-sex marriage the law of the land. Few legal cases have more dramatically demonstrated the complicated interaction of personal decisions, social movements, political struggles and judicial judgments than Obergefell v. Hodges. And on few issues has the American public so rapidly changed its collective mind. In Brown v. Board of Education, the court led public opinion. In Obergefell, the court followed it.

It’s plain how this happened: As individual gay men and lesbians came out, more and more Americans realized that someone they cared about belonged to a group that had long been oppressed and stigmatized. Supporters of gay marriage mobilized these new allies, gradually winning victories in legislatures and referendums. These campaigns further turned opinion to the point where Justice Anthony M. Kennedy could discern a 14th Amendment right to equal protection that did not seem to apply just a few years ago.

“The nature of injustice is that we may not always see it in our own times,” Kennedy wrote for the majority. “When new insight reveals discord between the Constitution’s central protections and a received legal stricture, a claim to liberty must be addressed.”

Yes, there is a new national understanding about gay rights and gay marriage that few (myself certainly included) imagined possible when the writer Andrew Sullivan first began pushing for marriage equality in 1989. It’s broad enough that millions of straight Americans shared the joy felt by gay men and lesbians on Friday. And not a few conservatives, knowing where things are moving, were happy to see the high court begin to take same-sex marriage out of politics.

This does not make the issue of judicial activism disappear. Liberals have rightly taken Roberts to task for his own brand of activism, especially in tearing apart laws on campaign finance and voting rights. Yet in both of this week’s key decisions, Roberts was an unambiguous voice for judicial modesty. It’s an approach liberals praised in the Obamacare case (“we must respect the role of the legislature, and take care not to undo what it has done”) and criticized in Obergefell (the majority, Roberts charged, “seizes for itself a question the Constitution leaves to the people”).

What both liberal and conservative inconsistencies about the nature of judicial activism suggest is that political activism, public opinion, the courts and the elected branches are not hermetically sealed off from each other. And the core liberal conviction about jurisprudence, developed during and after the New Deal years, still rings true: that the Supreme Court plays its most constructive role in our national life when it uses its power to vindicate the rights of beleaguered and disadvantaged minorities.

And thus will last week will be remembered as a stunning moment when our institutions converged to accelerate our long, steady movement toward an ever more inclusive equality.

Read more from E.J. Dionne’s archive, follow him on Twitter or subscribe to his updates on Facebook.