Zakani is the second hardliner to withdraw after Amir-Hossein Ghazizadeh Hashemi announced his resignation on Wednesday. Both candidates had meager chances, scoring less than 5% in several opinion surveys.
Six candidates were initially approved by the un-elected Guardian Council that vets all candidates and operates under the influence of Supreme leader Ali Khamenei.
In a statement on his official X account, Zakani pleaded with fellow hardliner candidates Jalili and Ghalibaf to unite in order to prevent the ascent of a reform-leaning candidate: "We must consolidate our efforts to address the rightful aspirations of revolutionary factions, thereby preventing the formation of another Rouhani administration."
Hardline contenders are wary of Masoud Pezeshkian potentially forming a government akin to a "third Hassan Rouhani administration," foreseeing a cabinet that might include former Foreign Minister Mohammad Javad Zarif among its ministers.
Zakani's political trajectory has been marked by controversy, particularly his confrontational approach towards reformists. Despite his assertive rhetoric, he has faced considerable criticism, including from state media, questioning his suitability for higher office.
His tenure as mayor has been fraught with challenges, including contentious urban policies such as mosque constructions in parks and enforcing hijab rules on public transport, which have stirred internal discord within the conservative faction and the city council.