At least five people have been reportedly killed in the resulting violence, reminiscent of the 2007 post-presidential election incidents which saw Mr Kenyatta dragged before the International Criminal Court.
Worldwide observers on Thursday gave the thumbs-up to the election, and USA ambassador Robert Godec issued a statement on behalf of the diplomatic community calling for the election commission to be given time to complete its work.
But Odinga supporters, many of them members of his Luo tribe or other allied tribes, said they are being robbed of yet another election. The electoral commission said this was "illegal and premature", and said basic mathematical errors had been made. "I therefore wish to declare Uhuru Kenyatta.as President-elect", said Mr Chebukati.
The National Super Alliance (NASA) has alleged massive rigging from shortly after the end of Tuesday's election, and had earlier asked the election commission (IEBC) to hold off on announcing results until their concerns could be addressed. Kenya's future is more important than any election.
"Ours is just to pledge that we shall continue with the work that we have already started and rededicate ourselves even more towards serving this great nation and our people", Uhuru said in his acceptance speech at the Bomas of Kenya on Friday night.
"Let us be peaceful. there is no need for violence".
Representatives of the opposition coalition then exited the main electoral centre in the capital, Nairobi.
"We assure Kenyans and all residents, the country is safe", said Matiangi. They stated that NASA allies in the IEBC have leaked the real numbers to them, which show that Kenyatta is not ahead by 1.4 million votes as the IEBC's website shows - rather it is Odinga ahead of Kenyatta by 286,298 votes.
Kenyatta took 54.27 percent of the vote, and opposition leader Raila Odinga took 44.74 percent, said election commission head Wafula Chebukati.
Uhuru, who is the sitting President of the Republic of Kenya, was declared victor together with his running mate William Ruto despite contests by the opposition that the election had been rigged.
In an announcement by the Independent Electoral and Boundaries Commission (IEBC), Kenyatta clinched a (55.5%) of the vote.
Angry protests had erupted in opposition strongholds in Nairobi and the western city of Kisumu, an opposition stronghold on Wednesday, with demonstrators burning tyres in the streets. He has not indicated how he will mount any challenge to the results in this election. He released 50 pages of what he claimed were the computer logs of the electoral commission which he said proved his claims.
On Friday morning, in anticipation of the official results being announced, Odinga's supporters staged protest marches in some areas, including burning tires in some of Nairobi's largest slums. But it has been battered by terrorist attacks, including one on an upscale Nairobi mall that killed 48 people in 2013, and another in 2015 at a northern university, which left 148 dead.