Two former presidents of Madagascar look set to compete in a hotly-contested run-off election in December after partial results on Thursday showed they were frontrunners in the first-round vote.With 80% of the ballots counted from last week's vote, Andry Rajoelina was on 39.63% and Marc Ravalomanana was on 35.42% - pointing towards a close race for the presidency in the head-to-head second round.Outgoing president Hery Rajaonarimampianina was in third place with eight percent."Given the results of the CENI (Independent National Electoral Commission), the second round is now inevitable," Madagascan analyst Mahery Lanto Manandafy told AFP.Under Madagascar's electoral regulations, the two frontrunners go through to a run-off - scheduled for December 19 - if neither manages to secure more than 50% in the first round."But anything is still possible if Rajoelina and Ravalomanana lodge a complaint in the courts," warned analyst Toavina Ralambomahay."Everyone hopes to be elected in the first round because a second-round election will bring huge campaign costs."Madagascar is one of the world's poorest countries, according to World Bank data, with almost four in five people living in grinding poverty on the Indian Ocean island.But the candidates spent huge sums on flashy campaign rallies, helicopters and giveaways such as free T-shirts for supporters.The three leading candidates have raised allegations of fraud and malpractice by election authorities, which have denied any wrongdoing.A European Union observer mission said in a report on Monday that it had "noted candidates committed breaches" ahead of the November 7 poll, but concluded that the election was well organised overall.Both Ravalomanana and Rajoelina were banned from contesting the last election in 2013 under international pressure to avoid a repeat of political violence that engulfed the island in 2009.Ravalomanana, 68, and Rajoelina, 44, are bitter rivals. It is the first time they have faced each other at the polls.Ravalomanana ruled from 2002 to 2009 until he was ousted in a military-backed coup that installed Rajoelina who was in power until 2014.Rajaonarimampianina succeeded him, ruling until earlier this year.Rajaonarimampianina's attempts to change the electoral laws this year 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 country, which is burdened by a long history of coups and unrest.* Sign up to News24's top Africa news in your inbox: SUBSCRIBE TO THE HELLO AFRICA NEWSLETTERFOLLOW News24 Africa on Twitter and Facebook.