PHOENIX — State lawmakers are free to give parents what amounts to a voucher of public funds to educate their children at any private or parochial school they want, the Arizona Court of Appeals ruled Tuesday.

In a unanimous ruling, the judges rejected arguments by the Arizona Education Association, the Arizona School Boards Association and others that providing funds that end up going to religious schools violates a state constitutional provision barring public funds from being used for religious worship or instruction.

Judge Jon Thompson, writing for the court, said the fact that parents decide where to spend funds, designated as “empowerment scholarship accounts,’’ or ESAs, makes who ultimately gets the dollars irrelevant.

“The ESA students are pursuing a basic secondary education consistent with state standards,’’ he wrote. “They are not pursing a course of religious study.’’

Thompson said the vouchers do not result in the state encouraging the preference of one religion over another, or religion over atheism.

The court also rebuffed claims the program violates another constitutional provision barring aid to any parochial or private school.

“The specified object of the ESA is the beneficiary families, not private or sectarian schools,’’ Thompson wrote.

Tuesday’s ruling most immediately deals with the vouchers lawmakers approved in 2011 to students with special needs.

That law requires the state treasurer to set up a special account that parents could tap to pay tuition and fees for their children at private or parochial schools or for other educational instruction. The aid is equal to 90 percent of what the state would otherwise pay in state aid to send that child to a public school.

That figure depends on everything from grade level to the child’s needs. Legislative staffers put the scholarships at anywhere from $1,700 to as high as $26,000.

Since then, however, the Legislature expanded the program to any students attending schools rated D or F. That potentially added 100,000 students to the program.

But both sides agreed Tuesday’s ruling eventually could be used to expand the program statewide, allowing the parents of all 1.1 million students in Arizona to use these vouchers to opt out of the public school system.

“There’s no constitutional impediment to expanding this program,’’ said Tim Keller, an attorney for the Institute for Justice, one of the groups that intervened to defend the legislation.

Don Peters, who represents challengers, said that’s always been the goal of those pushing these kinds of programs.

“They want to give every kid a scholarship,’’ he said. “And it’ll be interesting to see what happens to the public school system if they get their wish.’’

Keller said this program is the only one of its kind in the nation. But he said he does not expect it to destroy public education.

“I don’t expect every family to opt out of the public school system,’’ he said. But he acknowledged the aim of these vouchers is to give more parents exactly that option.

“What we’re doing is ensuring that every child has an opportunity to get an adequate education,’’ Keller said. “The public school system is a one-size-fits-all approach.’’

Peters, however, said the idea of market-based education would turn the whole system “into the equivalent of selling hamburgers.’’

He said the Legislature has a constitutional obligation to provide a good public education system.

What’s happened, Peters said, is that, as more parents opt out of pubic schools, lawmakers have shown less and less interest in providing adequate funding for them.

Peters has promised an appeal to the Arizona Supreme Court, which four years ago ruled a similar program was unconstitutional.In that case, the court found the fact the money was given to the parents did not get around the constitutional ban on aid to private and parochial schools — the exact same distinction that Thompson cited Tuesday in deciding this program passes constitutional muster.

Justice Michael Ryan, writing the 2009 ruling, said what makes these kinds of programs illegal is that the vouchers are not reimbursing schools for any contracted service for children.

“They are designed in such a way that the state does not purchase anything,’’ Ryan continued. “Rather, it is the parent or guardian who exercises sole discretion to contract with the qualified school.’’

“These programs transfer state funds directly from the state treasury to private schools,’’ he said.