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 G. Roberts Jr., 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 U.S. 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.”