Madagascar's past three presidents, all in the running against 33 other candidates in Wednesday's presidential vote, each had their terms tarnished by political crises.
Here is a look back at the turbulent recent history of the Indian Ocean island:
Marc Ravalomanana, a former milkman turned millionaire milk mogul is declared winner of the presidential election in 2002 after a crisis lasting nearly seven months against outgoing leader Didier Ratsiraka, who disputed the results. Ravalomanana is re-elected in 2006.
In 2009, Andry Rajoelina, a baby-faced ex-party planner and media boss who became mayor of the capital Antananarivo, emerges as an opposition leader. He denounces attacks on freedoms under Ravalomanana.
The government had shut down his TV channel in 2008 after it broadcast an interview with ex-president Ratsiraka, exiled since 2002.
Between January 26 and February 7, 2009, protests and clashes between Rajoelina supporters and the presidential guard leave around 100 people dead.
Having lost the support of the army, Ravalomanana resigns in March.
He takes refuge in South Africa, is sentenced in absentia in 2010 to life in prison and hard labour for the death of protesters in the 2009 unrest.
He is then arrested in 2014 after returning to Madagascar, but his sentence is lifted and he is freed from house arrest in 2015.
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.