Prosecutors at the International Criminal Court (ICC) in The Hague have withdrawn charges of crimes against humanity against Kenya's President Uhuru Kenyatta.
He had been indicted in connection with post-election ethnic violence in 2007-08, in which 1,200 people died.
Mr Kenyatta, who had denied the charges, said he felt "vindicated".
The prosecutor's office said the Kenyan government had refused to hand over evidence vital to the case.
Mr Kenyatta said he was "excited" and "relieved" at the dropping of charges.
"My conscience is absolutely clear," he said, adding that his case had been "rushed there without proper investigation".
Kenyan Foreign Minister Amina Mohamed said her government would try to have two other similar cases thrown out including one involving Deputy President William Ruto.
"As they say, one case down, two more to go," Mr Kenyatta said on Twitter.
On Wednesday, the ICC had given prosecutors a week to decide whether to pursue their case against Mr Kenyatta or withdraw charges.
Further delays in the case would be "contrary to the interests of justice", it had said.
On Friday, prosecutors said the evidence had "not improved to such an extent that Mr Kenyatta's alleged criminal responsibility can be proven beyond reasonable doubt".
The BBC's Anna Holligan in The Hague said the announcement was a huge blow to prosecutors.
Many observers had seen the case against Mr Kenyatta as the biggest test in the court's history, she says.
'Bribed and intimidated'
Mr Kenyatta was the first head of state to appear before the court, after he was charged in 2012.
The prosecution repeatedly asked for more time to build its case, saying witnesses had been bribed and intimidated, and the Kenyan government had refused to hand over documents vital to the case.
Human Rights Watch had accused the Kenyan government of acting as a roadblock and "impairing the search for truth".
Mr Kenyatta denied inciting ethnic violence following the disputed 2007 elections in order to secure victory for then-President Mwai Kibaki.
He has repeatedly accused the ICC of pursuing a political prosecution.
On Friday, he again criticised the legal process, saying: "The prosecutor opted to selectively pursue cases in a blatantly biased manner that served vested interests and undermined justice.
"As a result, the court has had to pay a steep reputational price, which it will continue to face unless a serious and systemic rethinking of the international justice framework is undertaken."
Mr Kenyatta won Kenya's presidential elections in 2013, with the backing of Mr Kibaki.
He used the ICC case against him to rally nationalist support by accusing the Dutch-based court of meddling in Kenya's affairs.
About 1,200 people were killed in the violence in 2007-8 and 600,000 were displaced.
Fergal Gaynor, a lawyer who represents victims of the violence, told the BBC's Foucs on Africa programme that there was a "widespread feeling of disappointment" at the dropping of the case against Mr Kenyatta.
He said there had been a "well-organised and systematic effort to undermine the ICC justice process and much of the blame for that can be laid with President Kenyatta's government".
Mr Gaynor said the victims had been "robbed" of justice and there was little legal recourse left.
"Frankly, this marks the end of the road," he said.
- Born in 1961, became Kenya's youngest president
- Son of the country's first president, Jomo Kenyatta
- Heir to one of the largest fortunes in Kenya, according to Forbes magazine
- Entered politics in 1990s, groomed by ex-President Daniel arap Moi
- Lost presidential race in 2002 by a large margin to coalition led by Mwai Kibaki
- Backed Mr Kibaki for re-election in 2007
- Married father of three
- Hobbies: Football and golf
Mr Ruto is on trial at the ICC on similar charges after his legal team's efforts to have the case thrown out failed.
He and Mr Kenyatta were on opposing sides during the 2007 election, with Mr Ruto accused of fuelling violence to bolster opposition leader Raila Odinga's chances of becoming president. He denies the charges.
Mr Ruto subsequently formed an alliance with Mr Kenyatta in the 2013 election, opening the way for him to become deputy president.
Analysts say the dropping of charges against Mr Kenyatta while the case against Mr Ruto continues risks reopening a political rift and upsetting Kenya's delicate ethnic balance.
Mr Kenyatta said the deputy president faced his accusers "with a clear conscience".
Mr Ruto and another defendant, Joshua Sang, "have been steadfast in declaring their innocence", said Mr Kenyatta.
"I am confident that they will be vindicated in due course."