A supporter of Kenya's President Uhuru Kenyatta, celebrates in the streets of Nairobi following the International Criminal Court's ruling to drop crimes against humanity charges against him, at the Hague, on Dec. 5, 2014. (Simon Maina/AFP/Getty Images)

Prosecutors at the International Criminal Court dropped charges Friday against Kenyan President Uhuru Kenyatta for alleged links to deadly post-election violence in 2007.

After a four-year investigation, prosecutors determined that there was not sufficient evidence to convict Kenyatta, the first serving head of state to come before the court.

“Evidence has not improved to such an extent that Mr. Kenyatta’s alleged criminal responsibility can be proven beyond reasonable doubt,” said Fatou Bensouda, the ICC’s chief prosecutor.

Kenyatta was indicted on charges that he had helped coordinate a series of violent clashes after the country’s 2007 election, during which more than 1,000 people were killed and more were raped or wounded. Kenyatta was accused of arming and funding the attackers.

He has long denied the charges, and he won reelection in 2013 despite the ICC’s ongoing investigation.

The International Criminal Court dropped "crimes against humanity" charges against Kenyan President Uhuru Kenyatta on Friday. Prosecutors say Kenyatta arranged a wave of deadly violence after Kenya’s 2007 elections. (Reuters)

The case was seen as a major test for The Hague-based ICC, which was created in 2002 to try major international crimes.

Kenyatta was accused of conducting "crimes against humanity." But the investigation was riddled with problems almost from its inception. Some key witness were killed or died. Others were bribed or intimidated, according to the prosecution.

“Attempts to identify, locate and interfere with prosecution witnesses are escalating, with a concomitant impact on their security,” prosecutors told the court in 2012.

Attorneys also claimed that the Kenyan government had blocked their access to key documents that might have bolstered their case against Kenyatta.

“It seems to me that if these cases are terminated, the government will see once again that obstruction of access to evidence is a viable strategy,” Fergal Gaynor, an attorney for the victims of the 2007 violence, told the court in October.

This week, judges denied prosecutors’ requests for more time to gather evidence.

The court added that prosecutors could bring new charges against Kenyatta “at a later date” if new evidence emerges.