The John Roberts show continued Tuesday at the Supreme Court. The chief justice cast the deciding vote to overturn a decision by the Montana Supreme Court that barred a state scholarship program from funding education at religious schools. In effect, the decision says that if a state has a program that provides scholarship funding for schools, it has to make those scholarships available to religious institutions — even when the state constitution has a provision barring aid to religion.

The conservative ruling followed others in previous years by Roberts. Like those that came before, it took yet another brick out of the wall separating church and state. In the foreseeable future, there may be no wall left at all.

The context for the decision, Espinoza v. Montana Department of Revenue, goes all the way back to the 19th century and the earliest days of the public school movement. From the start, public schools in the United States were labeled as "nondenominational" or "nonsectarian." As Catholic immigrants began to arrive in large numbers, some of them pointed out that the public schools were effectively Protestant, often featuring Bible readings from the King James version of the Bible and recitation of the Protestant version of the Lord's Prayer. Catholics sought state funding for their own schools, or, barring that, the elimination of what they saw as distinctively Protestant practices.

The response of America's Protestant majority was essentially to tell Catholics, "No way." In the run-up to the 1876 election, the Republican Party introduced a federal constitutional amendment that would have gone so far as to bar states from providing any funding to "sectarian" institutions, which meant Catholic ones. There was lots of anti-Catholic rhetoric in the public discussions of the proposed amendment, including on the floor of the U.S. Senate.

The amendment did not pass. (Nor was it expected to — it was proposed as a wedge issue to help the Republicans in the national election.) Nonetheless, many states adopted state constitutional amendments modeled on the failed federal one. As new states were admitted to the union, many of them also incorporated versions of the no-aid amendment in their constitutions.

Montana has such a provision that bars state aid to any school "controlled in whole or in part by any church, sect, or denomination." The Montana Legislature passed a law that gave tax credits for donations to organizations that award scholarships to students in private schools. The Montana Supreme Court interpreted the no-aid provision of the Montana Constitution to bar the law because it gave aid to religious schools — and struck down the program in its entirety.

Roberts's opinion for the court reversed the Montana Supreme Court decision. But because the U.S. Supreme Court can only interpret the federal Constitution, not state constitutions, Roberts couldn't just say that the Montana court misread the Montana constitution.

Instead, Roberts held that the Montana decision violated the free exercise rights of people in Montana who want to donate to scholarship programs or attend religious schools using scholarship money. His logic was that the no-aid provision as applied by the Montana court amounted to discrimination against religious schools simply because they were religious.

In reaching this conclusion, Roberts applied one of his own precedents, a 2017 decision called Trinity Lutheran v. Comer. In that case, Roberts established the principle that while a state is allowed to prohibit funding of religious activities, like the study of theology, it can't prohibit funding to people or institutions just because they happen to be religious.

The distinction between a religious activity and a religious person or institution is pretty tenuous, as Justice Neil Gorsuch pointed out at the time in a concurrence. But Roberts insisted on maintaining the distinction because he did not want overturn a 2004 decision by his old boss, then-Chief Justice William Rehnquist. In the 2004 case, Locke v. Davey, Rehnquist took the position that the state of Washington could apply its no-aid provision to deny funding to a student who wanted to use his state scholarship to fund a degree in devotional theology.

Roberts doesn't like to overturn precedent. He likes to use his doctrinal scalpel to cut away at the precedent until it's so minimal that you almost can't see it. That's what Roberts has done to the Locke principle. He hasn't overturned it; he's cut it down to nothing. In practice, however, this decision essentially does reverse Rehnquist's ruling in Locke v. Davey.

In separate dissents, liberal justices Ruth Bader Ginsburg and Sonia Sotomayor each made versions of the argument that Montana wasn't discriminating against religious schools, because the Montana Supreme Court struck down the entire private school scholarship tax credit, not only the part that would have gone to religious schools.

This argument is, I think, a bit too clever for its own good. Seen this way, the Montana ruling looks uncomfortably like a segregated Southern town shutting down its public swimming pool rather than allowing it to become integrated. Technically, closing the pool leaves no discrimination in place, since no one, Black or white, can swim. Practically, however, shutting down the pool looks like racial discrimination. It would be a different matter if the state legislature had never created the scholarship program in the first place.

The upshot is that John Roberts is continuing the court's gradual erosion of the separation between church and state. Government funding of religion is becoming not merely permissible but even obligatory under some circumstances.

I started my career as a law professor focusing on the church-state aspect of the First Amendment. Fifteen years ago, I would have considered this decision a disaster. Now it seems to me that the Republic faces far greater problems. Roberts is to the right of Rehnquist on the separation of church and state. But as we have seen in the last week, Roberts is well to Rehnquist's left on some other issues, including upholding basic abortion rights and checking the Trump administration's unlawfulness. I'll take it.

Noah Feldman is host of the podcast "Deep Background." He is a professor of law at Harvard University and was a clerk to U.S. Supreme Court Justice David Souter. His books include "The Three Lives of James Madison: Genius, Partisan, President."