Ghalibaf called on his supporters to back conservative cleric and jurist Ebrahim Raisi in Friday's vote, saying it was vital for the "preservation of the interests of the people, the revolution and the country".
Unofficial polls still show Rouhani, a moderate cleric who has sought to improve civil liberties and rebuild ties with the West, as the front-runner.
But he has faced a harder-than-expected challenge from the conservatives due to the continued stagnation of the economy.
This had been Ghalibaf's third bid for the presidency, having been runner-up to Rouhani in 2013.
A former police chief and member of the Revolutionary Guards, he has played on his tough-guy image in the past, but this year targeted his campaign against the wealthy elite, whom he dubbed the "four-percenters".
"A fundamental and crucial decision must be taken for the unity of the revolutionary front," Ghalibaf wrote in a statement announcing his withdrawal.
He launched brutal tirades against Rouhani and his reformist allies in the televised debates, accusing them of corruption and failing to support the poor.
"The expectation of us and the people is that this decision sets the stage for a new era of economic transformation that, by cutting off the four-percenters from the economy, will lead to youth employment and support for the underprivileged and poor in Iran.
"The fight has just begun," he said.
But it has struggled to attract the large-scale foreign investments Rouhani had promised when the deal came into force, and which he said were necessary to reduce unemployment and kick-start the economy.
Raisi is currently the head of the powerful Imam Reza shrine and charitable foundation in the holy city of Mashhad who has attracted support from traditional conservatives, and is seen as the favoured candidate of the security establishment.
Three other candidates -- reformists Eshaq Jahangiri and Mostafa Hashemataba, and conservative Mostafa Mirsalim -- are also standing in the election, though they are considered relatively marginal figures who may also withdraw before the vote.
Disclaimer: No Business Standard Journalist was involved in creation of this content
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
