Rejecting all complaints filed over the results, the court on Tuesday said Rajoelina won with more than 55 percent of the vote in the Indian Ocean island nation’s runoff election last month.
Rajoelina’s main challenger, former President Marc Ravalomanana, received more than 44 percent, the court said.
Just over 48 percent of the country’s 10 million registered voters cast their ballots in the vote.
“The victory is not only mine. It is also the victory of Malagasy people,” Rajoelina told supporters at his Young Malagasies Determined party’s headquarters on Tuesday.
Allegations of fraud
Ravalomanana had denounced the runoff results, alleging massive fraud on election day and during vote-counting.
He filed more than 200 petitions and complaints with the court, and his supporters have held protests in recent days in Antananarivo, the capital.
Ravalomanana had to quit the presidency in 2009 after a series of military-backed challenges supported by Rajoelina, who was mayor of Antananarivo at the time.
The 69-year-old Ravalomanana, who led from 2002 to 2009, had pointed to his experience during the build up to November’s election.
The 44-year-old Rajoelina, who was president from 2009 to 2014 during a transitional government, had campaigned on his youth.
Ravalomanana received 35.35 percent of the vote in the first round, with Rajoelina scooping 39.23 percent.
The pair’s vote share dwarfed that of the country’s most recent president, Hery Rajaonarimampianina, who received just 8.82 percent support.
Both candidates spent heavily on campaigning, with promises and handouts distributed liberally to voters, who are among the poorest in Africa.
Despite being the leading global producer of vanilla and a major exporter of Sapphire gems to the international market, more than 76 percent of Malagasys live in extreme poverty, according to the World Bank, subsisting on less than $2 a day.
The United Nations Human Development Index – which measures health, education and economic performance – ranks Madagascar 161st out of 189 countries.
Its agriculture sector, the main source of income for most people, is vulnerable to regular weather-related disasters such as tropical storms, flooding and drought.