Gov. Michelle Lujan Grisham signed a law Wednesday allowing New Mexicans to register to vote on Election Day, scrapping over the next several years a deadline that requires voters sign up nearly a month in advance.

Senate Bill 672 will add New Mexico to a list of 17 states that allow for same-day voter registration. And while Republicans opposed the measure, arguing it could invite fraud, backers maintain it will make voting easier and boost turnout in New Mexico’s elections.

“This is a victory for democracy,” Lujan Grisham said in a statement. “We should always actively seek out measures that will facilitate inclusion in our great American experiment.”

Voter registration ends 28 days before an election under current law.

But under SB 672, New Mexicans will be able to register to vote or update their registration during early voting through county clerks’ offices as well as designated polling sites.

And starting as soon as 2021, voters may also register to vote on Election Day. However, anyone registering right before voting would need to present a state identification card as well as proof of their address and sign an affidavit attesting they had not already voted in the election.

The new law also expressly prohibits voters from switching party affiliation when updating registration during an election.

That may assuage concerns that the law would effectively open up the state’s closed primaries and allow, for example, an independent to register as a Democrat at the last minute to participate in a Democratic primary. The Democratic National Convention’s own rules, however, encourage state parties to support so-called party switching as a means of boosting participation in primary elections.

The law will also ensure voter registration information is automatically updated when voters renew their driver’s licenses, unless a motorist opts out of the process. And it calls on the Human Services Department to set up a way so people who are receiving assistance, such as through the Supplemental Nutrition Assistance Program, are given an opportunity to register to vote when visiting department offices.

Backers argue these steps will help pave the way to automatic voter registration in New Mexico.

Sponsored by Sens. Linda Lopez and Daniel Ivey-Soto, both Albuquerque Democrats, as well as Rep. Linda Trujillo, D-Santa Fe, the law is a sort of compromise derived from a mashup of a couple different proposals that initially met with opposition during the 60-day legislative session that ended earlier this month.

Some county clerks, for example, raised concerns that the law would put a burden on local election officials.

But same-day voter registration has been a priority for good-government groups and Secretary of State Maggie Toulouse Oliver, who backed the legislation.

While the state saw a surge in voter turnout last year, it has long ranked poorly for election participation.

Meanwhile, states from Utah to California, Iowa and Maine have embraced same-day voter registration.

A 2013 report by the Commission on Youth Voting and Civic Knowledge recommended states adopt policies such as same-day voter registration, noting research has found that such laws tend to boost youth turnout.

Critics, however, note that most states have some sort of registration deadline in place, and opponents of the law have raised concerns that same-day voter registration could invite fraud.

“I view this as an opportunity to game the system and compromise the integrity of the ballot box,” said Rep. Larry Scott, R-Hobbs.

Republicans ended up opposing the measure, which passed the Senate 24-16 and the House 45-22.

The bill was the most high-profile measure of about 20 Lujan Grisham signed Wednesday.

The governor also signed House Bill 85, which guarantees the right of unions and employers to require employees pay fees as part of a labor contract. That does not change state law. But labor unions and Democrats backed the measure as affirmation New Mexico is not a so-called right-to-work state.

Lujan Grisham has until April 5 to sign bills passed during her first legislative session as governor. Any legislation she does not sign will be automatically vetoed.