NAIROBI, Kenya − The son of Kenya’s founding father, Uhuru Kenyatta, was named the winner of the country’s presidential election with 50.07 percent of the vote yesterday, but his opponent said Kenya’s democracy was on trial after what he said were multiple failures in the election’s integrity.

Supporters of Kenyatta − a man accused by an international court of helping to orchestrate the vicious violence that marred the nation’s last vote − flooded the streets, celebrating in a parade of red, his campaign’s color.

Refusing to concede defeat, Prime Minister Raila Odinga said the election process experienced multiple failures as he announced plans to petition the Supreme Court. Odinga asked for calm and for Kenyans to love one another, a call that may help prevent a repeat of the 2007-08 violence in which more than 1,000 people were killed and that brought Kenya to the edge of civil war.

Kenyatta’s slim margin of victory increases the focus on a multitude of electoral failures that occurred during the six-day voting and counting process. His margin of victory was just 4,099 votes out of 12.3 million cast.

The United States, Britain and the European Union gave Kenya’s new political era a chilly reception. All released statements but none mentioned Kenyatta by name. The West had made it clear before the vote that it would not welcome a President Kenyatta.

Kenyatta faces trial in July at the International Criminal Court over allegations he orchestrated the murder, forcible deportation, persecution and rape of Odinga’s supporters in the aftermath of the 2007 vote. Kenyatta, as president, may have to spend large chunks of his first years in Kenya’s highest office in a courtroom in The Hague.

The United States previously warned of “consequences” if Kenyatta wins, the nature of which depends on what happens in coming months. Britain has said it would have only essential contact with Kenyatta as president.

In his acceptance speech, Kenyatta gave a nod to the ICC, saying he recognizes the nation’s international obligations.