WASHINGTON — A divided Supreme Court on Tuesday said that states that provide assistance to private schools may not exclude some solely because they are religious, a major victory for those who want to see religious institutions play a more robust role in ‘‘school choice.’’
Chief Justice John Roberts, writing for a conservative majority in the 5-to-4 ruling, said the Montana Supreme Court was wrong to strike down a tuition assistance program passed by the Legislature. It allowed tax incentives for scholarships to private schools, including religious ones, but the state court said that ran afoul of a state constitution provision forbidding public funds from going to religious institutions.
The US Constitution’s protection of religious freedom prevails, he said.
‘‘A state need not subsidize private education,’’ Roberts wrote. ‘‘But once a state decides to do so, it cannot disqualify some private schools solely because they are religious.’’
The court’s four most consistent conservatives joined his opinion, while the court’s four liberals dissented.
The decision was a big win for school-choice advocates such as Education Secretary Betsy DeVos, who favor government support of students seeking faith-based education. Public school advocates said such programs take away resources that should be used to improve the systems.
The Trump administration supported the challenge to the Montana court’s decision and hailed the Supreme Court’s ruling, which ‘‘removes one of the biggest obstacles to better educational opportunities for all children,’’ the White House said in a statement.
Roberts was joined in the opinion by Justices Clarence Thomas, Samuel Alito, Neil Gorsuch, and Brett Kavanaugh.
The court’s liberals said the Montana Supreme Court had eliminated discrimination problems by ending the program. They said their conservative colleagues were too anxious to fix a problem that no longer existed.
The parents who brought the case ‘‘argue that the Free Exercise Clause requires a state to treat institutions and people neutrally when doling out a benefit — and neutrally is how Montana treats them in the wake of the state court’s decision,’’ wrote Justice Ruth Bader Ginsburg, joined by Justice Elena Kagan. ‘‘Accordingly, the Montana Supreme Court’s decision does not place a burden on petitioners’ religious exercise.’’
Justice Stephen Breyer said the court’s decision increases the risk of government entanglement in religion, with objecting taxpayers having to fund religious instruction.
‘‘If, for 250 years, we have drawn a line at forcing taxpayers to pay the salaries of those who teach their faith from the pulpit, I do not see how we can today require Montana to adopt a different view respecting those who teach it in the classroom,’’ Breyer wrote.
Justice Sonia Sotomayor also objected in a separate opinion.
Roberts responded that the state supreme court’s decision shut down a program that the Montana Legislature had created and could have ended.
‘‘The Montana Legislature created the scholarship program; the Legislature never chose to end it, for policy or other reasons,’’ he wrote. ‘‘The program was eliminated by a court, and not based on some innocuous principle of state law. Rather, the Montana Supreme Court invalidated the program pursuant to a state law provision that expressly discriminates on the basis of religious status.’’
At issue was an initiative passed by the Montana Legislature in 2015 that provided dollar-for-dollar tax credits up to $150 to those who donated to scholarship programs for low-income parents to send their children to private schools.
The program made no distinction as to whether parents could use the scholarships at religious or secular schools. About 70 percent of private schools in the state are religious.
The Montana Supreme Court said that measure ran counter to a state constitutional prohibition against using public funds for religious institutions and schools. Instead of saying the program could fund only secular schools, it struck down the tax credit program.
Montana is one of 38 states that exclude religious organizations from government funding available to others.
The state told the Supreme Court that it is reasonable for its constitution to prohibit direct or indirect aid to religious organizations.
‘‘The No-Aid Clause does not prohibit any religious practice,’’ Montana said in its brief. ‘‘Nor does it authorize any discriminatory benefits program. It simply says that Montana will not financially aid religious schools.’’
Its constitution prohibits using public funds for ‘‘any sectarian purpose or to aid any church, school, academy, seminary, college, university, or other literary or scientific institution, controlled in whole or in part by any church, sect, or denomination.’’
But Montana was called before a Supreme Court increasingly skeptical of such stark lines between church and state. A majority of justices in 2017 said Missouri could not ban a church school from requesting a grant from a state program that rehabilitated playgrounds. They have since been joined by Kavanaugh, who has signaled that other such restrictions deserve the court’s attention.
The challenge was brought by the libertarian law organization Institute for Justice on behalf of Kendra Espinoza, a single mother who sends her two children to a Christian school in Kalispell, Mont.
The organization has made school choice a priority, and has tried for years to get the Supreme Court to take on state constitutional amendments forbidding public aid to religious schools. It has waged war on the ‘‘Blaine Amendments’’ that swept though the country in the 1800s on a wave of anti-Catholicism. Montana’s amendment was adopted in 1884, before the state was admitted to the union.