(Reuters) - A federal court judge on Wednesday threw out a Texas voter identification law that was supported by the Trump administration, but the state’s attorney general said his office would appeal the ruling.

FILE PHOTO: A ballot is placed into a locked ballot box by a poll worker as people line-up to vote early at the San Diego County Elections Office in San Diego, California, U.S., November 7, 2016. REUTERS/Mike Blake/File Photo

The judge’s ruling said changes to the law passed earlier this year by the state’s Republican-controlled legislature that were meant to be less discriminatory than an earlier one did not accomplish that.

U.S. District Judge Nelva Gonzales Ramos of the Southern District of Texas said the state did not allow enough types of photo IDs for voters, “even though the (5th U.S. Circuit Court of Appeals) was clearly critical of Texas having the most restrictive list in the country.”

President Donald Trump campaigned on cutting voter fraud, picking up a theme of fellow Republicans across the country. Critics have said the Texas law and similar statutes enacted in other Republican-governed states are an effort to suppress voting, including among blacks and Hispanics who tend to favor Democrats.

Trump has made unsubstantiated allegations that millions of people voted illegally for his Democratic rival, Hillary Clinton, in last November’s election, in which Clinton won the popular vote but lost the decisive Electoral College count.

“Today’s ruling is outrageous,” Texas Attorney General Ken Paxton said in a statement.

Paxton, a Republican, added that changes to the law passed by the legislature included all those asked for by the 5th Circuit.

The Justice Department filed a brief last month asking the court to halt action against the Texas voter ID law, saying the state’s new law fixed discriminatory issues of the state’s 2011 voter ID law.

Texas Democrats welcomed Ramos’ ruling.

“Jim Crow-era tactics have kept Texas Republicans in power,” said state Democratic Party Chairman Gilberto Hinojosa. “From discriminatory gerrymandering to discriminatory voter ID laws, it has become entirely clear that Texas Republicans are rigging our election system.”

Ramos wrote in a 27-page ruling that voters with little education, or simply a lack of confidence, may forfeit their legitimate right to vote because of fear of being charged with perjury.

She said Texas was overreaching by “threatening severe penalties for perjury,” and noted that the state’s “history of voter intimidation” led her not to accept the new voter ID law as a solution for the “purposeful discrimination” in the one it attempted to improve upon.