The Supreme Court takes up the sensitive issue of religion in public life Wednesday, considering whether states violate the Constitution if they prevent religious groups from receiving some state benefits.

The justices are asked to strike a balance between the desire of a state to keep government out of religion and the claims of residents that religious faith should not freeze them out of state programs intended to help everyone.

The case comes from Montana, which established a program in 2015 to provide a tax credit of up to $150 a year for people and businesses that donate to private schools. The organizations that receive the contributions then give financial aid to parents, who decide which private schools their children should attend.

But shortly after the program was launched, a state agency barred any of the scholarship money from ending up at religious schools. Montana invoked a provision of the state Constitution that prohibits "any direct or indirect appropriation or payment ... to aid any church, school ... controlled in whole or in part by any church."

That threatened to shut the program down, because 90 percent of the private schools that signed up had religious affiliations.

Three mothers from low-income families sued to challenge the restriction. One of them, Kendra Espinoza, uses the scholarship money to send her two daughters to Stillwater Christian School in Kalispell, working three jobs and holding yard sales to help afford the payments.

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

"I chose that school because of the Christian-based education. It comes with a lot more of the values that I want to teach my children," she said in an interview. "If the scholarships are available, why should we be denied, as opposed to another family that chooses a different school for their children?"

The Montana Supreme Court ruled in 2018 that the scholarship program violated the state Constitution, so it struck down the entire law, eliminating the payments for both religious and secular schools. The program was allowed to continue for the current school year, however, while the case was appealed to the Supreme Court.

"The U.S. Constitution requires the government to be neutral, not hostile, towards religion," said Erica Smith of the Institute for Justice, the nonprofit libertarian law firm representing the women. "They should be treating families that want to go to religious schools the same as families that want to go to nonreligious schools."

Not doing so, Smith said, violates the First Amendment's protection of the free exercise of religion.

"Prohibiting all religious options in otherwise generally available student aid programs rejects that neutrality and shows inherent hostility toward religion," she said.

The mothers say a decision by the U.S. Supreme Court three years ago is heavily in their favor. It ruled that Missouri was wrong to exclude a Lutheran church from a state program intended to help nonprofits cover their gravel playgrounds with safer rubber surfaces. In his majority opinion, Chief Justice John Roberts wrote that blocking the church "from a public benefit for which it is otherwise qualified, solely because it is a church, is odious to our Constitution."

But Montana has said the disputed provision of its Constitution, adopted in 1889 and revised in 1972, was based on a concern that diverting money from public schools would tend to weaken the system in favor of schools established for private or religious purposes.

The state told the Supreme Court in its briefs that the law reflects the view that "barring aid to religious institutions promotes religious freedom by preventing the government from using its leverage to dictate religious policy." What's more, the state said, it protects the rights of people who object to supporting a religion "in which they do not believe."

Download the NBC News app for breaking news and politics

The Supreme Court has never drawn a bright line between acceptable and prohibited public aid for religious programs. In the Missouri playground case, it was careful to say the ruling was only about playgrounds, not about broader support of the church's religious mission. In a 2004 ruling, the court upheld Washington state's program awarding college scholarships to students who attended religious schools as long as they were not preparing to become members of the clergy.

Espinoza hopes the justices will rule that Montana's Supreme Court was wrong to strike down the entire scholarship program.

"This whole case has hinged upon the discrimination against any parents who want to send their children to a religious school," she said.

The court will decide the case by late June.