OKOLONA, Miss. — A special judge has ruled that a Mississippi town’s marshal lost the Democratic primary earlier this year, removing him from the post and setting the stage for a new election.

News outlets report Special Judge Barry Ford ruled Monday that Tommie Ivy Sr. was the rightful winner over current city marshal William Randle in the Democratic primary for town marshal in May.

Ivy appealed his one-vote loss, filing a lawsuit against the Democratic Executive Committee and Randle, arguing that some ballots were mishandled and that some votes were cast by unregistered voters.

Ford ruled that Ivy defeated Randle by two votes.

The ruling sets Ivy up for a run against his son, independent candidate Tommie Ivy Jr.

Gov. Phil Bryant must set a date for the special election.