A judge in New Hampshire ruled Monday that a tuition tax-credit program that allows public money to be used for religious school education violates the state constitution.

Three groups — Americans United for Separation of Church and State, the New Hampshire Civil Liberties Union and the American Civil Liberties Union — had challenged the state’s new Education Tax Credit Program by suing on behalf of nine plaintiffs.

The tax credit program offers businesses an 85 percent tax credit for donations they made to organizations that fund tuition at religious and other private schools. Such programs are sometimes called “neovouchers.

Strafford County Superior Court Presiding Judge John M. Lewis issued the ruling, which said in part:

New Hampshire students, and their parents, certainly have the right to choose a religious education. However, the government is under no obligation to fund ‘religious’ education. Indeed, the government is expressly forbidden from doing so by the very language of the New Hampshire Constitution.

The ruling says no public money can be used for religious school tuition.

(Correction: An earlier version said the program was shut down. Only the part that deals with religious schools was.]