Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A plan to make a playground safer for preschoolers is at the center of one of the most important legal battles in decades over the separation of church and state, to be heard Wednesday by the U.S. Supreme Court.

But an 11th hour change in policy by the state at the heart of the dispute could blunt the impact of the case.

At stake are bans in well over half the nation that prohibit spending tax dollars to support churches.

The states say they're necessary to keep the government from meddling in religious affairs.

But to the challengers, they're nothing more than a form of discrimination.

The court's newest justice, Neil Gorsuch, will take part in hearing and voting on the case. As an appeals court judge, he was receptive to arguments that government programs can violate religious freedom.

Five years ago Trinity Lutheran Church in Columbia, Missouri applied for money from a state program that helps non-profits cover their gravel playgrounds with a rubber surface made from recycled tires. The church wanted to improve the playground at its preschool and daycare center.

Though Trinity Lutheran qualified under the program's terms, the state rejected the application, citing a provision in the Missouri constitution that says "no money shall ever be taken from the treasury, directly or indirectly, in any of any church, sect, or denomination of religion."

The church sued but lost in the lower courts. Now it's asking the Supreme Court to rule that it cannot be excluded from a program that benefits other schools except those run by churches.

But late Thursday, Missouri's newly elected Republican governor, Eric Greitens, said religious organizations must be permitted to apply for and be eligible for state grants.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Their request for state money will be "judged on the merits like any other applicant," a statement from his office said.

Related: Sikh Americans Launch Ad Campaign That Looks to Push Back on Hate

It was a clear reversal of the policy under his predecessor, Jay Nixon, a Democrat. In response, the Supreme Court directed lawyers for both sides to submit letters by Tuesday on how the policy change affects the case.

A group that sided with the state's earlier position, Americans United For Separation of Church and State, said the court should now dismiss it.

"The governor made Trinity eligible to receive this grant," said Richard Katskee, the group's legal director. "The church no longer has anything to ask of the Supreme Court."

In legal briefs filed earlier with the court, lawyers for the church said the state's denial of funds for the playground project was unconstitutional.

"This religious exclusion wrongfully sends a message that some children are less worthy of protection simply because they enjoy recreation on a playground owned by a church," said David Cortman of Alliance Defending Freedom (ADF), a conservative organization representing Trinity Lutheran.

He argues that government should be neutral toward religion and that blocking the church from a widely available public program "imposes special burdens on non-profit organizations with a religious identity."

That amounts to "an undeniable hostility to religion," Cortman said.

Missouri responds that the constitutional provision does nothing to interfere with a church's religious activities.

Related: Texas Bill Allows Recusals for Issuing Same-Sex Marriage Licenses

"Trinity Lutheran remains free, without any public subsidy, to worship, teach, pray, and practice any other aspect of its faith however it wishes. The state merely declines to offer financial support," said James Layton, Missouri's solicitor general.

The US Constitution prevents the government from prohibiting the free exercise of religion, Layton said. "It does not guarantee churches opportunities for public financing."

Both sides will say that a 2004 Supreme Court decision helps them. The court ruled that Washington state did not violate the Constitution's free exercise clause when it declined to provide financial aid for students studying theology.

Trinity Lutheran says there's no such religious obstacle in its case, because the state grant would be used for an entirely secular purpose. "The surface that children play on as they enjoy recess is about as far as one can get from the devotional training of clergy," ADF's David Cortman said.

Not so, the state counters. "Money is fungible, and a dollar saved on capital improvements is an extra dollar that can be spend for religious teaching, salaries for church staff, or other religious purposes," said Missouri's James Layton.

The case has attracted widespread attention among groups defending religious liberties. Some claim that state bans like Missouri's are rooted in anti-Catholic bigotry and modeled after an effort by Rep. James G. Blaine, who unsuccessfully proposed a federal constitutional amendment in 1875 to ban government aid to churches.

A group representing Christian schools says a victory for Missouri could jeopardize government-funded loans to students who attend religiously affiliated colleges, including BYU, Georgetown, and Yeshiva University.

A total of 39 states have restrictions that either, like the Missouri provision at issue, ban state support for churches or forbid taxing their citizens in order to aid churches.

A decision is expected by late June.