A federal judge in Oregon dismissed a Justice Department lawsuit seeking the state’s unredacted voter rolls on Monday, calling it a failure to satisfy the legal requirements for obtaining the records. U.S. District Judge Mustafa Kasubhai said he would dismiss the case and issue a final written opinion in the coming days, according to an updated docket entry that showed Oregon’s motion to dismiss was granted.

Oregon Attorney General Dan Rayfield welcomed the dismissal, saying the court rejected the request because the federal government never met the legal standard to obtain the records in the first place. In an emailed statement, Rayfield said: “The court dismissed this case because the federal government never met the legal standard to get these records in the first place.” He also said, “Oregonians deserve to know that voting laws can’t be used as a backdoor to grab their personal information.”

Kasubhai scheduled the Monday hearing in the Oregon case after U.S. Attorney General Pam Bondi sent a letter to Minnesota Gov. Tim Walz on Saturday. The hearing focused on additional arguments on how Bondi’s letter related to the “basis and purpose” of the Justice Department’s request for voter data.

In Bondi’s letter, she asked Walz to support immigration officers and provided three “simple steps” to “help bring back law and order,” including a request that the Justice Department be given access to voter rolls. Bondi’s letter said access would allow the department to “confirm that Minnesota’s voter registration practices comply with federal law,” according to the court record described in the federal case coverage. Bondi also asked for Minnesota’s records for Medicaid and food assistance programs and for repeal of “sanctuary policies” that limit local officials’ cooperation with federal immigration authorities.

The Justice Department has sought detailed voter-registration information from multiple states, including names, dates of birth, residential addresses, driver’s license numbers and partial Social Security numbers. Officials in many states have argued that turning over such information would violate state and federal privacy laws, and election officials have raised concerns that the federal government’s access could be used for other purposes—such as searching for potential noncitizens on voter rolls.

Oregon’s response to the Justice Department came in letters and filings that argued the department lacked authority to request the statewide voter list while offering to provide the publicly available list. The Justice Department, in turn, argued it had authority under multiple federal laws and said it was complying with privacy laws, but Kasubhai said the Justice Department’s request did not meet the basis-and-purpose requirement.

In court, Kasubhai said the department argued it had authority under the Civil Rights Act of 1960, which provides that such records must be made available to the U.S. attorney general upon a written demand stating the basis and purpose of the request. Kasubhai ruled that the Justice Department’s August letter did not satisfy that requirement, adding that he reviewed the congressional record when the law was passed and found it “unequivocal” that the release of records was tied to investigations involving discrimination in elections.

The Justice Department declined to comment, while its lawsuit against Oregon was one of a broader set of actions. The department has filed lawsuits against at least 23 states and the District of Columbia as part of its effort to collect detailed voter data, and recent court decisions in Georgia and California dismissed similar requests.