The International Criminal Court (ICC) in The Hague has acquitted Ivory Coast ex-President Laurent Gbagbo.
He had been charged with crimes against humanity in connection with violence following a disputed 2010 election that left 3,000 dead and 500,000 displaced.
Mr Gbagbo was captured in 2011 in a presidential palace bunker by UN and French-backed forces supporting his rival, Alassane Ouattara.
He was the first former head of state to go on trial at the ICC.
The violence in 2010 in Ivory Coast, the world’s biggest cocoa producer, came after Mr Gbagbo refused to accept that he had lost a disputed election run-off to Mr Ouattara.
ICC judges ruled on Tuesday that he had no case to answer because the prosecution had not managed to prove several charges against him. They have ordered his immediate release.
Presiding Judge Cuno Tarfusser said the prosecution had “failed to demonstrate that public speeches by Gbagbo constituted ordering or inducing the alleged crimes”.
Mr Gbagbo’s supporters whooped, cheered and threw their firsts in the air in the public gallery following the announcement, the BBC’s Anna Holligan reports from the court.
Analysts say the development is a blow to the ICC’s reputation.
“Whenever a case involving mass atrocities essentially collapses at the ICC, it does damage to the perception of the court as a credible and effective institution of international justice,” Mark Kersten, author of Justice in Conflict, told the BBC.
“Many are concerned that the court is emerging as an institution where only rebels can be successfully prosecuted,” he added.