A US federal judge has dismissed a lawsuit by the Trump administration that sought to delay certifying results in Alaska's Senate race if the Republican incumbent loses, according to the BBC.

The suit, filed by the US Department of Justice, argued that having two candidates named Dan Sullivan on the ballot could cause "voter confusion" and draw support from incumbent Republican Dan S. Sullivan. The three-way race also includes Daniel J. Sullivan, who is running with no party affiliation, and Democrat Mary Peltola.

US District Judge Sharon Gleason ruled that the federal government does not have authority to force Alaska to segregate and investigate ballots in the race. She wrote that the Justice Department "provides no workable plan" for segregating ballots cast for Daniel J. Sullivan and conducting an "investigation" of them while preserving voter secrecy. She also said such a move would be too late, since many voters had already cast ballots in early and postal voting.

The Justice Department said it would appeal. In a statement, it said the court dismissed the case on "procedural grounds" but did not dispute its argument that Daniel J. Sullivan "entered the race as a frivolous candidate to confuse voters." The statement called Daniel J. Sullivan "Decoy Dan."

Asked about the lawsuit last month, President Donald Trump said he had directed the Justice Department to file it, calling Daniel J. Sullivan "the fake."

Daniel J. Sullivan told The New York Times that he has voted for both Democrats and Republicans in the past. Senator Dan S. Sullivan and his allies have accused Democrats of trying to confuse voters. The New York Times also reported that Democrats on Peltola's team worked with people who tried to recruit spoiler candidates in the race. Peltola has denied knowing anything about an alleged scheme that led to two Dan Sullivans appearing on the ballot.