He entered politics upon founding the Tiako Iarivo political party in 1999 and successfully ran for the position of mayor of Antananarivo, holding the position from 1999 to 2001. As mayor he improved sanitary and security conditions in the city. In August 2001 he announced his candidacy as an independent in the December 2001 presidential election. He then took office as president in 2002 amidst a dispute over election results in which he successfully pressed his claim to have won a majority in the first round. Under the leadership of Jacques Sylla, Ravalomanana's Prime Minister from 2002 to 2007, the political party "Tiako I Madagasikara" (TIM) was founded in 2002 to support Ravalomanana's presidency and came to dominate legislative and local elections. He was re-elected in December 2006, again with a majority in the first round.