Louisiana has repealed a century-old state law that required naturalized citizens to provide proof of their citizenship when they registered to vote, a change that effectively resolves a lawsuit’s discrimination claims.

Civil rights groups that sued last month to block the 142-year-old law’s enforcement announced Wednesday that they will withdraw their federal lawsuit now that state lawmakers have removed it from the books.

Their suit claimed the old law discriminated against foreign-born, naturalized U.S. citizens by arbitrarily subjecting them to “heightened” voter registration requirements that didn’t apply to native-born citizens.

The lawsuit was filed on May 4 by attorneys for the Southern Poverty Law Center and the Fair Elections Legal Network. In their suit, they said Louisiana’s law appeared to be the last of its kind still enforced in the U.S. Similar laws in other states used to be more common but were struck down, the suit added.

The law’s repeal was tucked into a broader elections bill that Gov. John Bel Edwards signed last Friday. A Senate committee proposed the amendment.

Secretary of State Tom Schedler, a defendant in the groups’ lawsuit, said in statement Wednesday that his office supported the law’s repeal.

“Saving taxpayers’ money by avoiding a needless lawsuit was common sense,” he said. “My office has already begun the process of communicating with our registrars of voters statewide to make sure they are informed immediately of the change in the law.”

Naomi Tsu, deputy legal director for the Southern Poverty Law Center, said in a statement that the change means naturalized citizens will no longer be treated like “second-class citizens” when they register to vote. Jon Sherman, an attorney for the Fair Elections Legal Network, said the repealed law was “legally and morally indefensible.”

“Ultimately, the credit for this victory goes to the naturalized citizens and community groups who stood up for their rights under the Constitution,” Sherman said in a statement.

The groups’ suit said 72,250 people who were living in Louisiana as of fiscal year 2014 were naturalized U.S. citizens. The groups claimed many Louisiana residents wouldn’t be able to vote in November’s presidential and congressional elections if state and local officials continued to enforce the law.

To register to vote in Louisiana, naturalized citizens have had to provide local elections officials with a certificate of naturalization, a U.S. passport or other documents proving their citizenship. Other residents simply must swear that they are citizens on the voter registration application.

Four other states — Alabama, Arizona, Georgia and Kansas — currently have proof-of-citizenship requirements for voter registration. Sherman has said Louisiana’s law was different from the others because its requirements singled out naturalized citizens.

The plaintiffs named in the suit include Norma Flores, a 51-year-old resident of Jefferson Parish who was born in Honduras and became a U.S. citizen in 2008. The suit said the law stymied Flores’ efforts to register and vote in the 2012 presidential election, the 2015 gubernatorial election and the 2016 presidential primary.