NASHVILLE, Tenn. — Officials on Wednesday set May 24 as the day voters will pick a candidate to complete the term of mayor in Tennessee’s capital city — a move that follows legal clashes over the date that came after the downfall of a rising politician.

The decision by the Davidson County Election Commission comes after a court battle that went all the way to the Tennessee Supreme Court. Voters will choose a candidate to complete the term of former Nashville Mayor Megan Barry.

The commission originally selected the date of Aug. 2, but mayoral candidate Ludye Wallace sued, saying that, by law, the election should have been set sooner. The Tennessee Supreme Court agreed this week and ordered a special election in May.

Barry resigned last month after pleading guilty to felony theft of taxpayer money connected to her affair with the head of her security detail and their travel together. She paid $11,000 restitution and was placed on probation. She was immediately replaced by Vice Mayor David Briley, who is running to complete her term.