CONCORD, N.H. (AP) — A judge has dismissed a pair of lawsuits challenging New Hampshire’s new provisional ballot law.

The law, which took effect in January, created a new type of “affidavit ballot” for first-time voters who don’t show proper identification and proof of residency at the polls. Those who fail to provide the documents within seven days will have their ballots thrown out, and the vote totals would be adjusted.

Previously, such voters filled out affidavits promising to provide documentation within 10 days, and those who didn’t could be investigated and charged with fraud. But the votes themselves remained valid.

Several individual voter and advocacy groups filed lawsuits last year, days after Republican Gov. Chris Sununu signed the bill into law. They argued that it violates the right to privacy the state added to its constitution in 2018 because it would diminish the secrecy of ballots and tie voters’ names to the candidates for whom they voted. But a judge recently granted a request from the secretary of state and attorney general to dismiss the cases.

In an order made public Friday, Merrimack County Judge Charles Temple agreed with the defendants that the plaintiffs lacked standing to challenge the law.

The individual plaintiffs already are registered to vote and thus can’t argue the changes will harm them, he said. And they don’t have standing as taxpayers objecting to the expenditure of public funds, he said, because the law doesn’t appropriate money.

The advocacy groups, 603 Forward and Open Democracy Action, argued they had standing because the new law would force them to divert resources to combat the law’s burdensome effects. The judge rejected that claim, saying the groups had no constitutionally protected rights at stake.

While provisional ballots are required by federal law, New Hampshire is exempt because it offered same-day voter registration at the time the National Voter Registration Act was enacted in 1993.