Uhuru Kenyatta , Kenya's deputy prime minister, has won the country's presidential election with 50.07 percent of the vote, official results show, just enough to avoid a runoff.
The country's electoral commission said voter turnout in the election was 88 percent.
Following the announcement on Saturday, Raila Odinga , outgoing prime minister, who came second in the election, said he would contest the result.
Odinga's camp had said during tallying that the ballot count was deeply flawed and had called for it to be halted.
Speaking in the Kenyan capital on Saturday, Odinga said "rampant illegality" across the entire election process has led him to seek a Supreme Court investigation into polling procedures.
Saying almost "every intstrument" of the Independent Electoral and Boundaries Commission, IEBC, failed, Odinga cited a lowering of voter registrations in his coalition's strongholds as an area of concern.
However, Odinga said he has "no other interests" other than to know if the Kenyans "want us" as their leaders.
Kenyatta and William Ruto, his running mate, said before the results were announced on Saturday that they were "proud and honoured for the trust being put on them".
Kenyatta's Jubilee Coalition party "took a message to the people of Kenya," it said in a statement quoted by the AFP news agency. "We are grateful to the people of Kenya for accepting this message."
Joyous supporters of Kenyatta thronged the streets in his tribal strongholds on Saturday following the result, lighting fluorescent flares and waving tree branches and chanting "Uhuru, Uhuru".
Speaking after his opponent, Kenyatta, called last week's polls, "the most free, the most fair, election in Kenya's history."
Kenyatta also thanked his "older brother, Raila Odinga, for his spirited campaign" and said that now is the time for all Kenyans to come together.
This said, Al Jazeera's Mohammed Adow, reporting from Nairobi, is a sign that "he knows that he doesn't have the support of more than half of Kenyans, who have voted along ethnic lines", and that with just over 50 percent of the vote, he will have to work to earn the trust of Kenyans who cast their ballots for other candidates.
Kenya will now become the second African country after Sudan to have a sitting president indicted by the International Criminal Court. Kenyatta faces trial for crimes against humanity.
"The international community and the European Union have been very loud in saying they will only have the most essential of contact with Kenyatta and his deputy,' said our correspondent.
"The US has gone further and warned Kenyans that while they have the right to elect their own leaders, that choice will have consequences.
"Kenya may be on the road to international isolation, but Kenyatta will likely stand to the pressure and will not be told how to lead the country."
In his first address to the Kenyan people as president-elect, Kenyatta called on the international community to "respect the sovereignty and democratic will" of the people of Kenya.