Uhuru Kenyatta narrowly won Kenya's presidential election Saturday, urging calm and pledging to work with rivals and cooperate with the international community.
Kenyatta, son of Kenya's founding president and one of Africa's richest men who is also facing an international crimes against humanity trial, scraped by with 50.07 percent of the vote to avoid a runoff against his closest rival Raila Odinga.
However Odinga, the outgoing prime minister, said he would contest the results in court, raising tensions following the key poll.
Odinga's charges on Saturday echo accusations in 2007 presidential polls when he alleged he was robbed of victory, with disputed results triggering bloody ethnic violence in which more than 1,100 people were killed.
"We have highlighted so many irregularities in the tallying process," Odinga told reporters, shortly after the Independent Electoral and Boundaries Commission (IEBC) chairman declared Kenyatta the "duly elected president".
Kenyatta, dressed in a suit and red tie, beamed a wide smile as he waved his official victory certificate from the IEBC to cheers from the crowd.
But shortly afterwards Odinga -- in his third failed attempt at the top job -- said his party would challenge the result at the Supreme Court, adding he had "faith in the judiciary and the ruling will be respected."
Political loyalties in Kenya are largely based along ethnic lines, and while Kenyatta's majority Kikuyu people and the new found Kalenjin allies of his running mate William Ruto partied, the Luo of Odinga mourned their loss.
"Any violence now could destroy the country forever, and that would not serve anyone's interests," Odinga said, who won 43.31 percent of the vote.
But Kenyatta offered "my older brother" Odinga an olive branch, telling thousands of his party loyalists he wanted to work with him "in moving our nation forward."
The new president-elect also called on his celebrating supporters not to laud it over those they have defeated, urging them in being "modest in our victory."
-- Odinga alleges fraud but urges peace --
Kenyatta's 50.07 percent of the vote, according to the election commission figures, narrowly broke the 50-percent threshold needed to avoid a second round poll by around 8,400 votes.
The 51-year-old outgoing deputy prime minister -- charismatic and able to appeal to all classes -- will become the first leader to take power whilst facing trial in The Hague-based International Criminal Court (ICC).
Both Kenyatta and his running mate Ruto, 46, who will become vice-president if results are confirmed, face ICC charges over the violence in the aftermath of the 2007 elections, including orchestrating murder, forcible transfer and persecution.
Concerns were high Saturday as to how Odinga loyalists will react to the results, five years since the wave of bloodshed following the disputed polls.
In the western town of Kisumu, an Odinga stronghold and one of the worst hit areas by violence in 2007, hundreds of youths chanted the slogan "no Raila, no peace" at armed police, but they later dispersed peacefully after appeals from community leaders.
"We can't accept this -- we are ready to die, we are ready for anything," said businessman Joshua Owino, a Luo like Odinga from Kisumu.
Police chief David Kimaiyo appealed for calm in a televised statement, telling Kenyans "to control our tempers, we need to control our disappointment, to accept the outcome of the elections in peace and the spirit of fair play."
There have been no major incidents of violence reported on Saturday beyond a few scuffles between police and gangs of youths.
Meanwhile excited crowds of thousands chanting Kenyatta's name poured onto the streets of towns across the country after figures were released in the early hours of Saturday morning, dressed in the red colours of Kenyatta's party.
Still Kenyatta will likely become the second African leader the ICC wants to put on trial, even as both he and Ruto protest their innocence and have repeatedly said they would cooperate with the court.
"We recognise and accept our international obligations and we will continue to co-operate with all nations and international institutions," Kenyatta said.
But he added -- to roars of applause from his supporters -- that the international community should also "respect our sovereignty".
Sudanese President Omar al-Bashir faced trial on war crimes charges at the ICC when he was re-elected in 2010, but has always defied an arrest warrant from the court.
The counting process for Monday's election was marred by technical problems and complaints from both sides.
Odinga's camp alleged that results had been "doctored", while Kenyatta's party raised concerns over the inclusion of spoiled ballots in the overall total.
The rigging claims have been dismissed by Kenya's electoral commission.