The Supreme Court in Comoros on Tuesday confirmed Azali Assoumani as the winner of the disputed presidential election held last week in the volatile Indian Ocean archipelago.
Azali was declared the winner with 59 percent of the votes, well ahead of his rivals Mahamoudou Ahamada who scored 15,7 percent and Mouigni Baraka Said Soilihi, who was a distant third with 5,5 percent of the ballots cast.
"Having obtained the absolute majority, Azali Assoumani is proclaimed president of the republic," said the country's judge president Harmia Ahmed.
The results were confirmed at a heavily guarded court house in Moroni.
The opposition has complained of widespread fraud and irregularities in the elections held in the country on March 24.
Observers and community groups have questioned the credibility of the election held on March 24.
Violence broke out last week after defeated one of the presidential candidates Soilihi Mohamed, who came fourth in the vote, was arrested.
Soilihi Mohamed, a widely respected former colonel, had been named head of an opposition transitional authority just before his arrest.
He stands accused of trying to set up a parallel government, according to a government source.
The African Union and France have called for restraint in the wake of the political crisis sparked by the disputed vote.
Azali's campaign director Houmed Msaidie said his camp was available to dialogue with the opposition "if the opposition asks for it".
Comoros has had a volatile political history since independence in 1975 and has endured more than 20 attempted coups, four of which were successful.
Azali initially came to power in a coup, then ruled the country between 1999 and 2006, and was re-elected in 2016.
He staged the poll after Comorans voted in a referendum, boycotted by the opposition, to support the extension of presidential mandates from one five-year term to two.
He could theoretically rule until 2029, critics say. Several opposition figures were arrested around the time of the referendum.