The Supreme Court appeared closely split during oral arguments Wednesday in a case with potentially major implications for the school choice movement, as the justices -- including Chief Justice John Roberts, who presided over President Trump's impeachment trial the previous night until 2 a.m. -- sparred with the lawyers and each other.

The case, Espinoza v. Montana Department of Revenue, centers around a tax-credit scholarship program passed in May 2015 that gave Montanans up to a $150 credit for donating to private scholarship organizations, helping students pay for their choice of private schools. The state's revenue department made a rule banning those tax-credit scholarships from going to religious schools before the state's supreme court later struck down the entire law.

SUPREME COURT TO HEAR CASE THAT COULD BRING MAJOR CHANGES IN SCHOOL CHOICE LAWS

"I feel that we're being excluded simply because we are people of religious background, or because our children want to go to a religious school," Kendra Espinoza, a mother who sends her children to a religious school and is the lead plaintiff in the case, said after the arguments. "We're here to stand up for our rights as people of faith to have the same opportunities that a secular schoolchild would have."

Montana's program was similar to many across the U.S., and other states have proposed tax-credit scholarship programs but not passed them due to confusion about their legality. In this case, the Montana Department of Revenue said providing tax credits for donations that later help pay tuition at private schools amounts to indirect funding of religious education by the state, in violation of the “no-aid clause” – also known as a Blaine Amendment.

If the justices were to reverse Montana’s decision, it could open the door to more scholarship and voucher programs across the U.S., following the high court's recent trend of expanding religious liberty.

At the Supreme Court Wednesday, Espinoza's lawyers -- a team from the libertarian Institute for Justice -- argued the program was voided simply because it afforded a religious option, and the U.S. Supreme Court should restore what the Montana legislature passed.

That point caused some disagreement among the justices, as Justice Elena Kagan argued the result of the Montana Supreme Court's ruling -- that neither secular nor religious private schools were receiving government money -- meant there was no need for the Supreme Court to step in. Justice Samuel Alito disagreed, citing case law that a decision made with unconstitutional motives was necessarily invalid, even if the concrete actions taken by the government were not necessarily illegal.

"As a result of this challenge, what has happened is that neither the parents who want to send their children to religious schools nor the parents who want to send their children to secular schools get what they would like to get," Kagan said, challenging Espinoza's lawyer. "So they're both being treated the same way."

Kendra Espinoza and her daughters. Espinoza is a plaintiff in a school choice case that's made its way to the Supreme Courts. (Institute for Justice)

Kendra Espinoza and her daughters. Espinoza is a plaintiff in a school choice case that's made its way to the Supreme Courts. (Institute for Justice)

STEVE DAINES' PRO-SECOND AMENDMENT BILL AIMS TO PROTECT LAW-ABIDING GUN OWNERS TAKING FIREARMS ACROSS STATE LINES

Alito later responded: "No, isn't the crucial question why the state court did what it did? If it did what it did for an unconstitutionally discriminatory reason, then there's a problem."

Justice Brett Kavanaugh pressed the Montana DOR's lawyer, Adam Unikowsky, on the distinction between religious and secular schools versus schools representing different religions.

"Suppose the state said we're going to allow the scholarship funds to be used for secular schools or protestant schools but not for Jewish schools or Catholic schools. Unconstitutional?" Kavanaugh asked. After Unikowsky replied that it would be, Kavanaugh went on: "So what's different when you say the scholarship funds can be used for secular schools but not for Protestant, Jewish, Catholic or other religious schools because of the religious status?"

Government money going to religious schools doesn’t necessarily violate the First Amendment, but appeals courts are split on whether excluding such schools from programs like Montana’s violates religious freedom, which is likely part of the reason why the Supreme Court agreed to hear Espinoza's case.

'So what's different when you say the scholarship funds can be used for secular schools but not for Protestant, Jewish, Catholic or other religious schools because of the religious status?'

— Justice Brett Kavanaugh

This case has drawn tremendous interest, with nearly 50 different "friend-of-the-court" briefs filed on its merits, advocating for either Espinoza or the Montana DOR's stance. Groups weighing in include the libertarian Cato Institute, large groups of states on both sides of the issue, former Wisconsin governor and school choice advocate Scott Walker, several members of Congress, the Trump administration, the Freedom From Religion Foundation and more.

One of the groups that submitted a brief was Americans United For the Separation of Church and State. In a press release Wednesday, group CEO Rachel Laser cautioned that forcing taxpayers to fund religious education violates the religious freedom of the taxpayer.

“Never before has the Supreme Court ruled that states must fund private religious education. It should not do so now,” she said. “Forcing taxpayers to fund religious education or private religious schools that discriminate against students, families and employees would be a fundamental violation of religious freedom. We urge the Supreme Court to honor the promise of religious freedom upon which our nation was founded by upholding the Montana Supreme Court’s ruling striking down the private school voucher program.”

SUPREME COURT TURNS AWAY CASE THAT COULD HAVE HELPED DEMS GET UNREDACTED MUELLER REPORT

Mae Nan Ellingson, a delegate to the 1972 Montana constitutional convention which included the no-aid clause, was at the Supreme Court Wednesday and pushed back on the idea that the provision was discriminatory.

"It certainly wasn't aimed at any particular religion," she said. "On the contrary, there were ministers and people that were delegates of all religious faiths, all of whom supported this no aid provision for a whole host of reasons, as were mentioned in the court today."

U.S. Secretary of Education Betsy DeVos, a school choice proponent, was in the courtroom as well. So was Espinoza, along with her children.

Espinoza said she enrolled her daughters in a private Christian school because she wanted a values-based education that would challenge them academically, but she has trouble paying for tuition and relies on scholarships. She planned to use Montana’s tax-credit scholarship program before the Department of Revenue made the rule preventing Christian schools from receiving these scholarships.

CLICK HERE TO GET THE FOX NEWS APP

Blaine Amendments originated in the 1870s when, as Justice Clarence Thomas wrote in a 2000 case, “it was an open secret that ‘sectarian’ was code for ‘Catholic.’” Thirty-seven states have Blaine Amendments today, but Institute for Justice senior attorney Michael Bindas calls them, “vestiges of 19th century anti-Catholic bigotry.”

Espinoza’s lawyers also cite Trinity Lutheran, a Supreme Court case from 2017 that ruled Missouri couldn’t deny a church a grant to resurface its playground simply because it was a church.

Fox News' Bill Mears contributed to this report.