U.S District Judge David Campbell has granted a restraining order to Krieger that will temporarily stop the Peoria City Council election, which means the votes cast next Tuesday for Peoria's Mesquite District will not count.
"This ruling today was for the voter and for all the people of Peoria," Krieger said. "If the courts wouldn't have intervened today, this would have been an international embarrassment for the city of Peoria.
A special election will be held in Peoria later this year, and the candidates have 10 days to decide when.
Krieger is running against Ben Toma and Bridget Binsbacher.
Earlier this month, when his name was left off the ballot the first time, the Maricopa County Elections Office issued an apology to Krieger and sent out replacement ballots, only to leave his name off them for a second time.
"It was my personal error," Karen Osborne, Maricopa County Elections director, said.
The Peoria City Council voted 3-2 on Aug. 7 for the County Elections Department choose one of two options to solve the issue, including send out a third ballot.
"It was confusing, in the beginning, having a second ballot," Krieger said. "But now a third ballot? Can you imagine what the voters are going to act like when they get a third ballot in the mail? This is totally unacceptable."
Krieger and his attorney opted to forge ahead with the lawsuit.
KTAR's Cooper Rummell, Bob McClay and the Associated Press contributed to this report.