Madagascar’s constitutional court has thrown out parliament’s bid to dismiss President Hery Rajaonarimampianina.
The court said impeachment proceedings launched last month had “no legal foundation” and that the president had not violated the constitution.
The opposition, which controls parliament, rejected the ruling.
Mr Rajaonarimampianina has been in office for 16 months and it was hoped his election would end years of political unrest in the country.
Under Madagascar’s constitution, an impeachment vote requires a two-thirds majority of the 151 members of the national assembly.
Mr Rajaonarimampianina had challenged the validity of last month’s impeachment saying many MPs who said they had voted were not in parliament at the time.
Reacting to Saturday’s court decision to throw out the vote, the head of the president’s HVM party, Rivo Rakotovao, said: “Everyone must submit to the decision of the constitutional court.”
In a comment issued just after the ruling, opposition spokesman Pierre Houleder called it “ridiculous”.
The parliamentary opposition to President Rajaonarimampianina is led by former strongman Andry Rajoelina.
Correspondents say the president is being attacked by both Mr Rajoelina and another former president, Marc Ravalomanana – both of whom were forced to withdraw from the 2013 presidential election won by Mr Rajaonarimampianina.
Madagascar suffered years of political turmoil beginning in 2009, when Mr Rajoelina ousted Mr Ravalomanana.
The coup left the country isolated in the international community and deprived of foreign aid. #BBC