Razafimahaleo was appointed as Minister of Finance and the Budget in the rival government of opposition leader Andry Rajoelina on 10 February 2009. As the political crisis involving Rajoelina and President Marc Ravalomanana escalated, Rajoelina's supporters installed Razafimahaleo in the Finance Ministry with the help of the military on 12 March 2009. Rajoelina took over the Presidency with the military's assistance a few days later.