In 1998, Ansip was elected as Mayor of Tartu as a candidate of the centrist-right Reformierakond (Reform Party), a position which he held until 2004, to great popular acclaim and very high ratings in the opinion polls.
He had run in previous elections for the Riigikogu, the Estonian Parliament, but had always given up his seat in order to remain Mayor.
It was obvious that Ansip would have to move to Tallinn, and a chance opened up when the Minister of Economic Affairs and Communications in the coalition government of Juhan Parts, Meelis Atonen, a party colleague, had to resign.
Ansip was able to form a coalition with the Centre Party and the People's Union of Estonia, which was approved by the Riigikogu on 12 April 2005.
On 4 March 2007, Ansip's Reform Party won 27 percent of the vote in the Estonian parliamentary elections, raising its mandate in the Riigikogu to 31 seats from 19.
In March 2011, the Reform Party won 33 seats in the Riigikogu, remaining the largest party even after the country's economic output had fallen by 14 percent in 2009 due to the global financial crisis and the collapse of a real estate price bubble fueled by cheap and easy credit from Nordic banks.
Ansip's third term as prime minister began on 6 April 2011, when Riigikogu approved his third cabinet.
But Ansip's center-right coalition soon struggled in polls amid signs of voter fatigue at years of a government focused on fiscal austerity as well as several high-profile party funding scandals.
Shortly after, Prime Minister Taavi Rõivas nominated him as the country's next European Commissioner.
The removal of the monument, as well as war graves, from its location on 27 April 2007 led to mass protests and two nights of the worst rioting Estonia has seen since regaining independence.
[16] Andrus Ansip is a member of the Estonian voluntary home guard organisation Kaitseliit (Defence League) since 10 November 2009.