In March 2009, Rajoelina seizes power from Ravalomanana with the backing of the military.
The international community denounces what it deems a coup d'état and for nearly four years foreign aid and investment is frozen, driving the island deeper into poverty.
The main political factions in the country sign an accord in September 2011 to draw up a roadmap to guide Madagascar to elections.
In December 2013 with the support of the outgoing regime, Hery Rajaonarimampianina wins the presidential election, taking over at the start of 2014.
Neither Ravalomanana nor Rajoelina were running against him in the vote, as the international community feared their participation would reignite political turmoil on the island.
Less than 18 months later however, in May 2015, the country's parliament votes overwhelmingly to dismiss Rajaonarimampianina for alleged constitutional violations and general incompetence.
Rajaonarimampianina challenges the legality of the move and in mid-June the country's constitutional court throws out the impeachment demand.
Between April and June 2018 demonstrators take to Antananarivo's central square in protest over Rajaonarimampianina's efforts to change electoral laws that opponents say are intended to favour his party.
The courts overturn the proposals but the protests turn into a full-blown movement to oust Rajaonarimampianina.
To avert the breakdown of Madagascar's political system, the Constitutional Court orders the formation of a "consensus" government to stage the polls by the end of the year.
Rajaonarimampianina offers his resignation on September 7 as required by the constitution, but he is eyeing a new presidential mandate at Wednesday's poll in which he must win 50 percent of votes to avoid a run-off on December 19.