President Uhuru Kenyatta of Kenya was the first sitting head of state to appear at the International Criminal Court (ICC) before the charges against him were dropped.
He went before the court in The Hague on 8 October to deny inciting post-election violence in 2008.
ICC prosecutors announced on 5 December that they had still not obtained enough evidence to prove his criminal responsibility beyond reasonable doubt. Refused more time to prepare their case, they dropped it.
Mr Kenyatta's deputy, William Ruto, is on trial on similar charges, which he also denies.
What was the violence about?
Kenya exploded into ethnic violence after then-President Mwai Kibaki - an ally of Uhuru Kenyatta - was hurriedly inaugurated at night for a second and final term in office, despite claims by opposition candidate Raila Odinga - an ally of William Ruto - that the result had been rigged.
The violence was the worst to hit Kenya since independence from British rule in 1963, threatening the stability of East Africa's biggest economy and the main regional ally of Western powers, especially the US and UK.
It saw neighbours turn on each other as lingering ethnic tensions burst into the open. People were dragged out of their homes and hacked and burnt to death in images that shocked the world.
Why did a political dispute turn into an ethnic conflict?
Mr Kibaki comes from Kenya's biggest ethnic group, the Kikuyu. They are resented by other communities who accuse them of expanding their grip on land and power since independence.
So after Mr Kibaki was sworn in, members of other ethnic groups, especially the Kalenjin, took revenge on Kikuyus, killing them or forcing them to leave areas the Kalenjin saw as theirs.
This led to tit-for-tat violence which lasted for several weeks, leaving more than 1,200 people dead and forcing 600,000 to flee their homes.
How did Mr Kenyatta and Mr Ruto become implicated?
Mr Kenyatta is a Kikuyu who threw his weight behind Mr Kibaki while Mr Ruto is a Kalenjin who backed Mr Odinga, a Luo, in the 2007 election.
Mr Kenyatta was alleged to have developed a plan to take revenge for attacks on Kikuyus and keep Mr Kibaki in power. He was also accused of being the focal point between the government and the Kikuyu Mungiki sect, which was sent to the Rift Valley, setting up roadblocks and going house to house, killing some 150 suspected Odinga supporters.
Mr Ruto, whose trial began last year, is accused of planning even before the election to set up militias to attack Kikuyus and is alleged to have urged his supporters to uproot the weeds from the fields - referring to communities in the Rift Valley with origins elsewhere in the country.
How did the conflict end?
Mr Kibaki and Mr Odinga signed a power-sharing deal in April 2008 after mediation by ex-UN chief Kofi Annan.
It saw Mr Kibaki retaining the presidency, while Mr Odinga was appointed prime minister - a post he held until his defeat at the hands of Mr Kenyatta in elections in March last year.
The deal also said that if Kenya failed to try those accused of greatest responsibility for the violence, they should face justice at the ICC.
Despite being in opposite camps in the 2007 election, Mr Kenyatta chose Mr Ruto as his running mate in the 2013 poll.
They said their alliance was an example of reconciliation but their critics said it was a cynical attempt to avoid justice.
So why did the ICC pursue the cases?
They were seen as tests of the ICC's ability to force political leaders to face justice - the very reason it was set up.
The ICC launched an investigation after Mr Annan presented it with a sealed dossier of suspects involved in the violence. He acted after the Kibaki-led government failed to establish a special tribunal to try the perpetrators of violence.
Mr Kenyatta and Mr Ruto portrayed their cases as foreign interference in Kenya's affairs, helping them to whip up nationalist sentiment as they campaigned for elections last year.
The African Union agreed with this stance, demanding last October that Mr Kenyatta's trial be deferred.
However, some Kenyans, in particular opposition supporters of Mr Odinga, backed the ICC prosecutions.
MPs from his party boycotted a vote in parliament last year on leaving the ICC - a move which did not affect the existing prosecutions, and which in any case did not occur.
Why were the charges against Mr Kenyatta dropped?
Judges had given prosecutors an ultimatum to produce additional evidence such as Mr Kenyatta's bank statements and phone records.
In a court filing, prosecutor Fatou Bensouda said: "The evidence has not improved to such an extent that Mr Kenyatta's alleged criminal responsibility can be proven."
What happens now?
The dropping of the charges is a huge blow to the prosecution as many saw the case against Mr Kenyatta as the biggest test in the ICC's history, the BBC's Anna Holligan reports from The Hague.
The ICC was partly designed to hold the most powerful leaders to account.
Kenya's ruling coalition could come under strain if the trial against Mr Ruto continues.
"Of course there would be tension in government, which would intensify towards the 2017 general election," political science lecturer Henry Amadi told Kenya's Star newspaper.
Election violence timeline:
- Then-President Mwai Kibaki declared the winner of December 2007 elections - Raila Odinga cries foul
- Opposition protests lead to clashes with police and degenerate into ethnic violence across the country
- Some 1,200 killed and 600,000 flee homes
- Incumbent President Uhuru Kenyatta in Kibaki camp; accused of orchestrating violence against ethnic groups seen as pro-Odinga
- Incumbent Deputy President William Ruto in Odinga camp; accused of targeting pro-Kibaki communities
- Power-sharing deal signed in April 2008 after mediation by ex-UN chief Kofi Annan
- Mr Kenyatta and Mr Ruto form alliance and win March 2013 election
- Mr Ruto's trial began in September 2013
- Mr Kenyatta's trial hit by delays and in September 2014 was adjourned indefinitely because of lack of evidence
- Prosecutors dropped the charges against Mr Kenyatta on 5 December, citing lack of time to prepare the case