The Indiana Supreme Court on Tuesday upheld the law creating the nation’s broadest school voucher program, clearing the way for a possible expansion.

In a 5-0 vote, the justices rejected claims that the law primarily benefited religious institutions that run private schools and accepted arguments that it gave families choice and allowed parents to determine where the money went.

The court said the law did not violate the state constitution’s guarantee of religious freedom or a ban on the use of state funds for religious institutions. It noted that while the Indiana Constitution does not allow direct spending on religious institutions, it doesn’t prohibit them from receiving indirect government services, “such as fire and police protection, municipal water and sewage service, sidewalks and streets.”

The Indiana case has received national attention because the program has wide eligibility. Middle-class families are allowed to participate in Indiana, while in most states, such programs are limited to low-income families or those in failing schools. Jeff Reed, spokesman for the Friedman Foundation for Educational Choice, said 530,000 Indiana students qualify for vouchers.

The Milwaukee Parental Choice Program is the nation’s largest in terms of actual enrollment. That program, enacted in 1990, had 24,027 participants this school year, Reed said. The Indiana program has 9,000 students actually enrolled.

The Indiana State Teachers Association had filed suit over the program, saying it drained money from public schools. Its attorney, John West, told the court in November that virtually all of the voucher money goes to schools whose primary purpose is to promote the teachings of their affiliated churches.

Teacher Teresa Meredith, the main plaintiff in the lawsuit and vice president of the Indiana State Teachers Association, called the ruling a setback for public education.

“I still very much believe that public schools are where most of our society is educated, and we need to be investing and making those the best they can be,” she said in a phone interview. “The vast majority of students will be robbed so that a group of students can get religious education on taxpayer dollars,” she added.

Solicitor General Thomas Fisher, defending the law, told the court in November that parents were free to send their children to any school they wished, public or private, religious or not.

The state Supreme Court agreed with that, saying in a 22-page opinion written by Chief Justice Brent Dickson that the program primarily benefited parents, not schools, because it gave parents choice in their children’s education.

Dickson also rejected school voucher opponents’ claims that the state constitution requires a public school system, saying lawmakers have broad discretion in how children are educated.

State School Superintendent Glenda Ritz joined the lawsuit while campaigning last year, but she removed her name from the list of plaintiffs shortly after winning office. She has walked a delicate line in the statehouse since then, saying she opposes that law but is sworn to uphold it.

There is still some question about how popular the vouchers are in Indiana. Voters in November replaced former Republican Schools Superintendent Tony Bennett, long the state’s most visible supporter of vouchers, with Ritz, a Democrat who opposes the measure. But voters also awarded a supermajority to House Republicans, who have pushed for a sweeping expansion of vouchers this year.