Laurent Gbagbo has been acquitted by the International Criminal Court (ICC), almost eight years after his arrest for crimes against humanity.
The former Ivory Coast president was accused of playing a role in murder, rape, persecution and other "inhumane acts" amid the violence that erupted after the country's disputed 2010 presidential election.
Mr Gbagbo and his co-accused, former youth minister Charles Blé Goudé, both pleaded not guilty to the charges.
Despite more than 80 witnesses called to court by the prosecution, ICC judges ruled prosecutors had not managed to prove several charges against Mr Gbagbo and ordered his immediate release.
A defiant rise to power
Born in 1945, Mr Gbagbo is a classically educated academic and is now widely regarded as a leader who was willing to destroy his country by refusing to accept defeat at the ballot box.
After 20 years in opposition, he came to power in 2000 when military leader Robert Guei's attempts to rig elections were defeated by street protests in the main city, Abidjan.
In April 2011, Mr Gbagbo was himself forced from office - captured in a bunker at the presidential palace by UN and French-backed forces supporting his rival Alassane Ouattara, internationally regarded as the winner of elections five months earlier.
Mr Gbagbo was transferred to the ICC at The Hague, where he became the first former head of state to be tried there.
The conflict killed some 3,000 people.
More on Ivory Coast:
Mr Gbagbo maintained that he was the victim of a French plot. He suffered from post-traumatic stress in prison, but judges in 2015 rejected his request to be temporarily released on health grounds.
Mr Gbagbo cut his political teeth in the trade union movement and he played heavily on his reputation as the main opposition figure to former President Felix Houphouet-Boigny's one-party state.
He started out on the political left, but since the 1980s has taken a strongly nationalist, even xenophobic, stance.
Mr Gbagbo said the dispute over Ivory Coast's presidency was a fight for Ivorian (and indeed African) sovereignty and he accused the French and Americans of siding against him.
Ivory Coast, he said, was a nation blessed by God, and neo-colonialists wanted to control it for its cocoa and oil fields.
However, this argument did not prevail and the African Union backed the UN's finding that Mr Gbagbo lost the election and should stand down.
Mr Gbagbo was accused of surfing on the wave of xenophobia that swept Ivory Coast during the rule of President Henri Konan Bedie.
Mr Bedie introduced the concept of "Ivoirite" (Ivorianness) to prevent Mr Ouattara, a Muslim with family ties to neighbouring Burkina Faso, from standing in presidential elections in the 1990s.
Laurent Gbagbo: Dates with history
- 1971: Jailed for "subversive teaching"
- 1982: Exile in Paris after union activism
- 1988: Returns to Ivory Coast
- 1990: Defeated in elections
- 1992: Jailed after student protests
- 2000: Declared winner of disputed elections
- 2002: Failed coup divides Ivory Coast
- 2007: Agrees power-sharing government with former rebels
- 2010: Refuses to accept election defeat; civil war breaks out
- April 2011: Forced from power and arrested
- November 2011: Transferred to ICC at The Hague
- June and December 2014: Charges confirmed
- January 2016: ICC trial commences at The Hague
- January 2019: Acquitted of crimes against humanity
When a civil war two broke out in 2002, Mr Gbagbo's supporters were accused of carrying out xenophobic attacks in areas they controlled - against those from the mainly Muslim north, immigrants from neighbouring African countries and Westerners.
They accused former colonial power France and the UN of not doing enough to put down the rebellion which had split Ivory Coast into two, with rebels allied with Mr Ouattara seizing the north.
Mr Gbagbo's forces never regained control of the north, and the rebels went on to help Mr Ouattara force him out of power in 2011.
Mr Gbagbo was born into a Catholic family near Gagnoa, in the cocoa-growing central-west of the country, on 31 May 1945.
"Cicero", as he was nicknamed because of his taste for Latin during his school days, has a PhD in history.
Beginning his career as a university lecturer, Mr Gbagbo was jailed for two years in 1971 for "subversive" teaching. His nom de guerre was "little brother".
In the 1980s he was involved in trade union activity among academics.
He was one of the first to challenge Ivory Coast's founding President Houphouet-Boigny in the 1980s - as soon as the long-serving independence leader permitted multi-party politics.
In 1982 he sought exile in Paris, returning six years later to attend the founding congress of the Ivorian Popular Front (FPI).
His time as an opposition leader led to spells in jail and brushes with the authorities.
His wife, Simone, was a politician in her own right and some saw her as the real hardline power behind the throne, preventing her husband from giving up office.
The ICC had issued an arrest warrant for Mrs Gbagbo as well, but this was dismissed by the Ivorian government.
A court in Ivory Coast sentenced her to 20 years in jail for her role in the violence that followed the 2010 poll. In August 2018, Mrs Gbagbo was granted amnesty by President Ouattara in a move to foster reconciliation.
Passion for music
After his election in 2000, Mr Gbagbo said he would break with the personality cult tradition, saying it was no longer necessary to put up portraits of the president in public places and offices.
He also said that the national media would no longer be obliged to mention the president in all news programmes.
But while he was in power, most news broadcasts highlighted Mr Gbagbo's daily activities.
He has a reputation for being short-tempered, in particular against "arrogant" journalists, but he is also known for his contagious laughs and vigorous handshakes.
In person he has a broad smile and an easy laugh, and is a born communicator, frequently making use of metaphors from Ivorian daily life.
He is said to have a passion for music, guitar and good food.
Still, the man who campaigned under the slogan "we win or we win", can be a stubborn political player and, his opponents claim, had links to violent militia groups such as the students' union, the Fesci, the Young Patriots, and death squads, despite his reputation as a peaceful, Sorbonne-educated socialist.
He also earned himself the nickname "the baker" for his ability to "roll his opponents in the flour", after showing an uncanny knack of coming out on top in any political tussle.
It appears he has done it again.