Islamist-backed candidate Souad Abderrahim defeated a city official who served under ousted despot Zine el Abidine Ben Ali on Tuesday to become the first woman mayor of the Tunisian capital.
"I dedicate this victory to all Tunisian women," Abderrahim said. "My first task will be to improve the face of Tunis."
Deteriorating waste disposal services have blighted the capital since Ben Ali's 2011 overthrow in the first of that year's Arab Spring uprisings.
The 53-year-old manager of a pharmaceutical firm, known for her pant suits and blow-drys, has risen to the fore as one of the new faces of veteran Islamist party Ennahdha as it seeks to modernise its image.
Although she is a member of the party's politburo, she stood as an independent in the May 6 municipal election, in which she headed the Ennahdha list.
With 21 seats out of 60, the list emerged as the largest on the city council but well short of a majority.
Abderrahim won election as mayor in a second round of voting by councillors which was boycotted by left-wing and centrist parties who refused to support the candidates of either of the main parties.
She defeated Kamel Idir, candidate of the Nidaa Tounes party of President Beji Caid Essebsi, by 26 votes to 22.
Islamist-backed candidate Souad Abderrahim celebrates after being elected the first woman mayor of Tunis on July 3, 2018