Madagascar went to the polls on Wednesday to elect a new president, with the three front-runners all former heads of state facing-off amid efforts to defuse a political crisis.Attempts by the most recent president, Hery Rajaonarimampianina, to change the large Indian Ocean island's electoral laws backfired, sparking nearly three months of sometimes violent protests in the capital Antananarivo.The demonstrators forced Rajaonarimampianina to accept a "consensus" government tasked with organising the election in the poor country with a history of coups and unrest.Nearly 10 million voters are eligible to cast ballots for one of 36 candidates who, in addition to the three front-runners, include two ex-prime ministers, pastors and a rock star. Polling stations opened at 03:00 GMT and are due to close by 14:00 GMT.Short queues of early voters formed at several polling stations in the capital"I've come here to do my duty by voting. I want a president who gets me out of poverty," said Eline Faraniaina, an unemployed 60-year-old, casting her ballot at a vocational college. One presidential contender must win 50% of votes cast or a second round will be held on December 19.Rajaonarimampianina is competing against two of his predecessors. Marc Ravalomanana, a milk mogul, ruled from 2002 to 2009 and Andry Rajoelina, a former club night promoter nicknamed "the disc jockey", succeeded him and was in power until 2013.The trio staged massive rallies over the weekend in the capital, each attracting tens of thousands of supporters. The former French colony has struggled to overcome political divisions after a disputed 2001 election that sparked clashes and a 2009 military-backed coup that ousted Ravalomanana.Former Malagasy President and Presidential candidate Marc Ravalomanana casts his ballot in the first round of the presidential election in Faravohitra district, in Antananarivo. (AFP)Apart from protests earlier this year, Rajaonarimampianina's term was mostly peaceful but anger over the past still simmers.He has promised "a new phase" in Madagascar's development if elected."I'm poor. I live hand to mouth, day to day. I don't have anything to eat for tomorrow," said Coledette, a mother-of-four angered by recent increases in the price of rice ahead of the poll.Bloody protests The key battle will be between Rajaonarimampianina and the former presidents Ravalomanana and Rajoelina, according to analysts and the findings of a banned pre-vote poll seen by AFP.If none of the hopefuls reaches the 50 percent threshold this time, only two candidates will go through to a second round vote."The big risk of this election is that it will return us to an era of crisis," said Sahondra Rabenarivo, an analyst at the Malagasy Observatory on Public Life."It's very important that the results are credible and that the third-placed candidate accepts them." Tensions are high between Ravalomanana and Rajoelina, who succeeded him with the backing of the army in the 2009 uprising.Madagascar is one of the world's poorest countries, according to World Bank data, with almost four in five people living in grinding poverty.The main contenders - armed with significant campaign resources - have criss-crossed the island of 25 million by helicopter promising voters a better future.Madagascar presidential candidate Andry Rajoelina casts his ballot in Antananarivo. (AFP)"They should revive the country. Madagascar suffers malnutrition and is ravaged by cyclones," said retiree Lili Rahaingo, 68, as she queued to vote in the capital.Although there were bloody protests in April that left two people dead, campaigning has been peaceful.'Disgusted' Some candidates have however been accused of vote-buying. The head of Transparency International in Madagascar, Ketakandriana Rafitoson, was "disgusted" by what she says was the use of T-shirts, sewing machines and even floor tiles to secure votes.Around 20 lower-profile candidates have alleged irregularities in the electoral roll and had unsuccessfully called for the poll to be delayed.Both Ravalomanana and Rajoelina were banned from contesting the last elections in 2013.