A federal judge on Sunday dismissed the Department of Justice lawsuit seeking to delay certification of Alaska’s Senate election because two candidates named Dan Sullivan appeared on the ballot. One of them is Republican Sen. Dan S. Sullivan, the incumbent, while the other is retired school teacher Dan J. Sullivan.

Judge Sharon Gleason ruled that the federal government had not shown it had legal standing to bring a civil complaint seeking to postpone certification if the incumbent lost. The decision came two days before Election Day and two days after the U.S. Attorney for Alaska disclosed ongoing criminal and civil investigations into the non-incumbent Sullivan’s decision to run.

The ruling is a victory for Democratic nominee Mary Peltola, who, together with state election officials and others, had asked the U.S. District Court in Anchorage to dismiss the case. Peltola’s campaign has faced allegations that it solicited the retired teacher to enter the race, but it has denied any involvement. The Democratic Senatorial Campaign Committee has also denied participating in his campaign.

The DOJ had sought an investigation into voter intent and possible confusion if Sen. Sullivan lost. Its requests included preventing Alaska from certifying the election under certain circumstances, requiring the state to segregate and preserve some ballots, and allowing federal officials to investigate voters who selected Daniel J. Sullivan.

Gleason said those requests involved the “time, place, and manner” of the election, responsibilities that belong to the state rather than the federal executive branch. She also said the government had not explained how its requested relief could address its alleged injury while preserving ballot secrecy.

The judge refused to allow the DOJ to amend the lawsuit again. The case had already been amended the previous week to add a legal claim and details from a New York Times report about the alleged recruitment of the second Sullivan. Gleason said another amendment would be futile because the court lacked authority to order ballots segregated for an unspecified federal investigation into voters.

President Donald Trump has said he ordered the lawsuit, which was filed on Oct. 23. He argued that Peltola and other Democrats recruited the former teacher to confuse voters who intended to support the incumbent senator. The New York Times reported that Peltola campaign aides and DSCC aides had been involved in efforts to recruit him, allegations both organizations have denied.

The Department of Justice and the White House had been asked for comment on the dismissal.

Sources: CNBC Markets.