A federal judge Wednesday rejected Texas’ revised voter identification requirements, handing another court defeat to the state’s Republicans over voting rights.

Texas has spent years fighting to preserve both the voter ID law — which was among the strictest in the U.S. — and voting maps that were both passed by GOP-controlled Legislature in 2011. Earlier this month, a separate federal court earlier found racial gerrymandering in Texas’ congressional maps and ordered two of the state’s 36 voting districts to be partially redrawn before the 2018 elections.

On Wednesday, U.S. District Judge Nelva Gonzales Ramos rejected a watered-down version of the voter ID law that was signed by Texas Gov. Greg Abbott earlier this year. The judge’s new ruling came three years after she struck down the earlier version of the law.

The new version of the law didn’t expand the list of acceptable photo identifications — meaning gun licenses remained sufficient proof to vote, but not college student IDs.

But the changes would allow people who lack a required ID to cast a ballot if they signed an affidavit and brought paperwork that showed their name and address, such as a bank statement or utility bill. The new version was supported by the U.S. Justice Department, which once opposed the law but has reversed its position since President Donald Trump took office.

Republican Texas Attorney General Ken Paxton called the ruling “outrageous” and said an appeals court should void it.

“The U.S. Department of Justice is satisfied that the amended voter ID law has no discriminatory purpose or effect. Safeguarding the integrity of elections in Texas is essential to preserving our democracy,” Paxton said in a statement.

But Gonazles Ramos said Texas didn’t go far enough with its changes and said that criminal penalties Texas attached to lying on the affidavit could have a chilling effect on voters who, fearful of making an innocent mistake on the form, simply won’t cast a ballot.

Nor was she swayed by Texas clarifying under the revised law, known as Senate Bill 5, that both U.S. passport books and cards would be accepted. “This feature remains discriminatory because SB 5 perpetuates the selection of types of ID most likely to be possessed by Anglo voters and, disproportionately, not possessed by Hispanics and African-Americans,” she wrote.

“From discriminatory gerrymandering to discriminatory voter ID laws, it has become entirely clear that Texas Republicans are rigging our election system,” said Gilberto Hinojosa, chairman of the Texas Democratic Party.

The Associated Press contributed to this report.