A federal judge on Tuesday dismissed a Justice Department lawsuit aimed at obtaining Arizona’s detailed voter records, according to the Associated Press. U.S. District Judge Susan Brnovich, a Trump appointee, ruled that Arizona’s statewide voter registration list does not qualify as a document the attorney general may request under federal law, and she dismissed the case with prejudice. In doing so, Brnovich wrote that any amendment would be legally futile.

The ruling comes as the Trump administration has pushed in court to force states to provide detailed voter-roll information. The Associated Press reported that the Justice Department has sued at least 30 states and the District of Columbia seeking access to voter data that can include birth dates, home addresses, driver’s license numbers and partial Social Security numbers.

Brnovich’s decision effectively ends the Arizona case in the federal court system on the claims brought by the Justice Department, with the dismissal issued with prejudice. The court’s reasoning focused on whether the relevant federal statute gives the attorney general a right to request the kind of statewide registration records Arizona maintains.

Arizona Secretary of State Adrian Fontes said the outcome protects voters’ privacy. In a statement, Fontes said, “This moment is a win for voter privacy,” and added, “I will never comply with illegal requests that put Arizona voters in harms way.”

The Justice Department did not immediately respond to a request for comment, according to the Associated Press. The dispute in Arizona was brought after the DOJ sued Fontes in January for failing to comply with the department’s request for detailed voter information.

The dismissal in Arizona follows other setbacks for the Justice Department in similar lawsuits in different states. Judges have rejected the DOJ’s attempts in Rhode Island, California, Massachusetts, Michigan and Oregon, the Associated Press reported, and in Georgia a judge dismissed a DOJ case filed in the wrong city before the government refiled elsewhere.

The Associated Press also reported that at least 13 states have either provided or promised to provide their detailed voter registration lists to the Justice Department. Those states, as cited by the Brennan Center and AP reporting, include Alaska, Arkansas, Indiana, Louisiana, Mississippi, Nebraska, Ohio, Oklahoma, South Carolina, South Dakota, Tennessee, Texas and Wyoming.

Federal officials have said they need the voter data to ensure states are complying with federal election laws governing how registration lists are maintained. In the Rhode Island case, an attorney for the Justice Department acknowledged the department was seeking unredacted voter roll information so it could be shared with the Department of Homeland Security to check citizenship status, according to the Associated Press.

Democratic and some Republican officials have objected to the DOJ’s requests, arguing the demands violate state and federal privacy laws, the report said.