What do recycled tires have to do with religious liberty? The Supreme Court is finding out.

The Supreme Court heard arguments in a closely watched church-state case Wednesday, and all eyes were on Justice Neil Gorsuch who was hearing the biggest case of the term so far during his first full week on the bench.

Gorsuch waited for nearly the whole argument to ask a question, and it was a similar to a line of questions posed by other justices, that seemed in general to favor the church's position in the case.

The case involves an initiative launched by Missouri in 2012 to encourage schools to use recycled tires to produce safer playground surfaces.

But the religious liberty battle began when a preschool run by Trinity Lutheran Church was denied a state grant to participate in the program.

Missouri said that under its Constitution, state funds couldn't be used for religious activities.

Trinity Lutheran sued. Its lawyers argued that the state's action constituted religious discrimination in violation of the federal Constitution's Free Exercise and Equal Protection Clauses. On Wednesday, the justices tackled the case that could produce one of the most important opinions of the term, unless it fades away because of a procedural snag that surfaced last week.

Liberal justices Elena Kagan and Stephen Breyer joined some of the conservative justices in questioning the state about what line should be drawn when the church said it planned to use the grant money not for religious activities but to protect children on the playground.

Kagan pointed out that the selective program was offered to nonprofits. "Everyone is open to compete (for the grants) on various neutral terms," she said. "And you're depriving one set of actors from being able to compete in the same way everybody else can compete because of their religious identification."

Later, Kagan said,"But it does seem as though this is a clear burden — looked at that way, this is a clear burden on a constitutional right. And then your interests have to rise to an extremely high level."

"I'm asking," Breyer said at one point, "does the Constitution of the United States permit a state or a city to say, 'We give everybody in this city police protection, but not churches? We give everybody fire protection, but let churches burn down?'"

James Layton, a lawyer on behalf of the state, pushed back on the justices' questions -- stressing at one point that the program at issue was not a general program but a selective program.

"But how do we draw the line between 'selective' and 'general?' One could seem to play with that line forever," Gorsuch said.

Justice Sonia Sotomayor joined by Justice Ruth Bader Ginsburg had the toughest questions for the church.

"I believe that this playground is part of the ministry of this church," Sotomayor said.

Ginsburg pointed to court precedent from 1947. "This court said in no uncertain terms what the framers didn't want was tax money imposed to pay for building or maintaining churches or church property." Ginsburg asked whether that precedent was "passé".

A federal appeals court in January 2015 rejected the church's claims.

Advocates for separation between church and state believe that if the Supreme Court reverses the lower court it will clear the way for the government -- under certain circumstances -- to be required to give state funds to religious institutions. The Missouri Constitution states, "no money shall ever be taken from the public treasury, directly or indirectly in, in aide of church." Almost 40 other states have similar provisions that could be affected if the Court rules in favor of the church.

Supporters of the church believe they will prevail and the court will hold that once the state creates a program similar to Missouri's Playground Scrap Tire Surface Material Grant Program, it can be required to include religious schools.

"In essence, the church is arguing that states can't specifically exempt religious organizations from grant programs that it chooses to provide," said Steve Vladeck, CNN Supreme Court analyst and professor of law at the University of Texas School of Law. "The Supreme Court has previously suggested that they can, where the funding would otherwise support religious activities. This case really boils down to whether funding a religious school's playground is tantamount to impermissibly funding religion, or is, instead, the kind of neutral state program from which religious groups can't be excluded."

In briefs, lawyers for the church argued that the "categorical exclusion of religion in this case is unvarnished status-based discrimination" and they said the state's action "exhibits an undeniable hostility to religion that offends the Constitution's essential mandate of religious neutrality."

David Cortman, a lawyer for the conservative Alliance Defending Freedom, which is representing the church in the case, argued "that it is not rational to categorically exclude churches from neutral and otherwise generally available public benefit programs when their objectives and practical impact are entirely secular."

"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," he said.

The case could turn on a 2004 Supreme Court case called Locke v. Davey where the majority held that the State of Washington could deny a scholarship to a student planning to study theology in graduate school without violating the Free Exercise Clause. Scalia and Justice Clarence Thomas were in dissent.

The church distinguishes its case from Locke v. Davey, arguing that the state funds in that instance were used to fund the religious training of clergy. The grant at issue in Trinity Lutheran, they argue, is used to protect children from cuts and bruises on the playground.

"The separation of church and state is an important principle," said Richard Garnett a freedom of religion expert at the University of Notre Dame, "but it does not prevent religious institutions and governments from cooperating to advance public purposes and secular purposes like protecting preschoolers' knees."

Layton, serving as a special assistant attorney general for Missouri, argued in briefs that "the people of Missouri have decided, as a matter of state constitutional policy, that public funds may not be directed to churches." He stressed that nothing about the policy prohibits the church from engaging in religious exercise.

"Trinity Lutheran remains free, without any public subsidy, to worship, teach, pray and practice any other aspect of its faith however it wishes," he argued.

Religious freedom expert Gregory Lipper believes that a ruling in favor of the church could produce a slippery slope.

"While this case may be about a church playground, the next case could easily involve a church that demands taxpayer money for a shelter but then refuses to allow same-sex couples to use its shelter," he said.

The case has attracted friend of the court briefs on both sides of the issue. Proponents of school choice programs -- that allow parents to use public funds to send their kids to private or religious schools -- believe an opinion in favor of the church could remove one of the biggest legal obstacles to school choice in the states.

"The Court's decision in Trinity Lutheran could have implications far beyond scrap tires and church playgrounds," wrote Timothy Keller, a senior attorney with the Institute for Justice. "Nearly 40 state constitutions have similar constitutional provisions that opponents of school choice have tried to invoke in the past to halt school choice programs in their tracks," he said.

There is a procedural wrinkle -- that developed on the eve of arguments -- that could give the justices an off-ramp to deciding the case.

Newly elected Missouri Gov. Eric Greitens, a Republican, recently announced that his administration would reverse course and allow religious organizations to apply for and be eligible for such state grants.

In a statement he said that before he came into office in 2016, "government bureaucrats were under orders to deny grants to people of faith who wanted to do things like make community playgrounds for kids."

"That's just wrong," he said.

Although Greitens said he didn't expect his decision to impact the Supreme Court case, the justices are asking the parties to respond to whether the case is now moot.

There is a procedural wrinkle -- that developed on the eve of arguments -- that could give the justices an off-ramp to deciding the case, but at oral arguments it didn't receive much attention.