PORTLAND, Maine (AP) — Maine's highest court has rejected an appeal by a couple who wanted the town of Swans Island to pay for their children's education at a Christian school.

Jason and Priscilla Joyce argued that the subsidy to send their children to a religious school in Trenton came from town funds — not state funds — and therefore was exempt from state law banning the use of public money for religious education. They also argued that the town's payment was to them, not to the school.

In a unanimous opinion, the Maine Supreme Judicial Court ruled that the law applies to all public funds.

Justice Andrew Mead wrote that differentiating between money raised by the state and money raised by a municipality would be "to invite a shell game with public monies."

Mead also wrote that it makes no difference whether the money was paid directly to the school or to reimburse the Joyces after they paid the school tuition. The town's policy made it clear that the subsidy would pay the cost of sending children to religious schools in violation of state law.

The Joyces filed a complaint in Kennebec County Superior Court in 2007 after the attorney general's office issued an opinion that the town's policy of giving parents money for religious education violated state law. Swans Island voters approved the policy in 2006.