When Ghalibaf lost the 2005 election, he was proposed as Mayor of Tehran along with Mohammad Aliabadi and Mohammad-Ali Najafi. On 17 September 2005, he was elected as the next Mayor by the City Council of Tehran to succeed Mahmoud Ahmadinejad who left the office after being elected president. He received 8 out of 15 votes of the council. He was reelected for a second term on 12 September 2010 after receiving 12 votes with no opponent.