Gov. Phil Murphy on Wednesday signed a bill into law allocating $2 million in taxpayer money to fix a glitch with New Jersey’s mail-in ballot law — which could determine whether thousands of residents automatically receive a ballot to vote by mail in the upcoming November elections.

The Democratic-controlled state Legislature came in from summer break the last two days to pass the emergency legislation.

It aims to clear up the confusion around New Jersey’s year-old mail-in voter law. Murphy and fellow Democrats said the goal of the law was to make it easier for people to vote by mail when they can’t do so in person, allowing those who request mail-in ballots to receive them for life.

But when the state Division of Elections sent out recommendations to county clerks about how to administer the law, one suggestion was that the 172,000 voters who requested mail-in ballots in 2017 and 2018 must reapply to vote the same way this year.

In a statement, Murphy said the law will “ensure that voters who requested mail-in ballots for any election in 2017 and 2018 will receive a mail-in ballot in all future elections, unless the voter informs his or her county clerk otherwise.”

“Many voters who previously requested mail-in ballots will expect to receive them again in future elections, and I am pleased to sign a bill into law that will accommodate these voters,” the governor added in a statement.

The original law grandfathered in voters who requested mail-in ballots for the 2016 elections. But the division interpreted that to mean it doesn’t cover voters who requested them the last two years.

A county government group challenging the legislation said the $2 million appropriations isn’t enough to fix the problem. John G. Donnadio, executive director the New Jersey Association of Counties, told NJ Advance Media he anticipated at least $4 million would be needed.

His organization filed a complaint with the New Jersey Council on Local Mandates to overturn the law because the state did not include they money to pay for it.

The council announced Wednesday it will hear the county association’s complaint on Sept. 23.

Republicans have blasted the law, saying it does nothing to deter voter fraud and will burden county clerks. They also say the fix passed this week was rushed through to “rig” November’s elections in Democrats’ favor.

State Assembly seats top this year’s ballot, and Democrats hope to keep their majority in the lower chamber of the Legislature, if not expand it. More mail-in ballots could help them.

Susan K. Livio may be reached at slivio@njadvancemedia.com. Follow her on Twitter @SusanKLivio. Find NJ.com Politics on Facebook.

Brent Johnson may be reached at bjohnson@njadvancemedia.com. Follow him on Twitter @johnsb01.

Have a tip? Tell us. nj.com/tips