A federal judge in Alaska on Sunday dismissed a Justice Department lawsuit over the state's Senate race, NBC News, Fox News and the BBC report. The department quickly said it would appeal.

The race pits Republican Sen. Dan S. Sullivan against Democrat Mary Peltola. A third candidate, Daniel J. Sullivan Jr., is also on the ballot. The lawsuit argued that the shared name could confuse voters and cost the senator support.

The department asked the court to separate and keep ballots cast for Daniel J. Sullivan. It also sought to delay or block certification if the senator loses, Fox News and NBC News report.

District Judge Sharon Gleason said the government had not explained how it could look into those ballots and still keep them secret. "The United States provides no workable plan," she wrote, according to the BBC. She said the request would violate Alaskans' right to a secret ballot.

A department spokesperson said the court ruled "on procedural grounds" and did not dispute its claim that the second Sullivan joined the race to confuse voters. Any appeal would go to the 9th U.S. Circuit Court of Appeals.

The fight follows a New York Times report that people tied to Peltola's campaign helped recruit the second Sullivan. Peltola has denied any role, and Sullivan Jr. has denied working with her campaign, Fox News reports.

A Peltola spokesperson called the case a "baseless lawsuit" from a "weaponized" department, NBC News reports. Sen. Sullivan said he would accept the results.

A separate criminal investigation into Sullivan Jr.'s run has not been resolved, Fox News reports.

What we know: The suit was dismissed and the department plans to appeal.
What we don't: How the appeals court will act, or what the criminal probe will find.