Rajoelina won 43.5 percent of votes cast in Wednesday's vote, while Ravalomanana secured 42.44 percent, according to results from 147 polling stations out of 24,852 nationwide.
The country's most recent president Hery Rajaonarimampianina trailed with 2.93 percent of the votes counted so far.
The Ceni electoral commission estimated turnout at 47.18 percent.
Attempt to change voting law
This election came after the outgoing president Rajaonarimampianina's attempt to change voting laws – which observers say would have excluded Rajoelina and Ravalomanana – led to three months of protests earlier this year.
Rajaonarimampianina gave in to voters' demands by calling Wednesday's vote.
“This is part of a very long history in Madagascar of incumbent governments trying to draft laws that are very clearly aimed not at restricting democracy, free speech or political participation in general but by judicially blocking one individual who may be seen as a threat,” said Paul Melly, a Madagascar specialist at Chatham House in London, in an interview with RFI.
Officials say that voting went peacefully, without any incidents.
Rajaonarimampianina on Thursday alleged that "many voting irregularities" pointed to fraud in this week's election, heightening fears of a disputed result.
“There is a significant risk that one of the leading candidates will refuse to accept either that they’ve been knocked out in the first round or that they’ve lost in the run-off race,” said Melly. “Madagascar has a long history of political crises and struggles to move through a constitutional process, from one president to the next – but luckily what it doesn’t have is a long history of civil war.”
Several candidates have been accused of attempting to buy votes by giving out goods like T-shirts, sewing machines and even floor tiles. However, “this kind of thing is par for the course,” Melly argued.
“In Madagascar, at the top level of politics, there is a history of very large scale corruption and lavishly funded elections,” he concluded.