Kenya's election commission declared that the 55-year-old businessman and son of the country's founding President had received enough votes to secure a second five-year term.
Kenyatta garnered 54.27% of the final vote, similar to what he had in a preliminary count. Odinga received 44.74%.
The President, in a nationally broadcast speech, said he and his opponent were not enemies.
"We are all citizens of one republic," he said. "As with any competition, there shall always be winners and there shall be losers. But we all belong to one great nation called Kenya."
Kenyatta said he wanted to work with the opposition National Super Alliance (NASA).
"I extend a hand of partnership knowing fully well that this country needs all of us pulling together in order for us to succeed," he said.
Congratulations came from Ugandan President Yoweri Museveni as well as Rwandan President Paul Kagame, who applauded Kenyatta on Twitter "for a successful election and the trust Kenyans have placed in you!"
The President told his countrymen there was no need for violence.
The nation's top elections official, Wafula Chebukati, said the vote was carried out in a "free, fair and credible manner."
Opposition calls vote a 'charade'
Odinga, a 72-year-old former political prisoner who has campaigned for the presidency four times, is refusing to accept the results
, claiming the vote was hacked.
Speaking before the declaration, Musalia Mudavadi, co-principal of NASA, said the organization would not be party to the announcement of Kenyatta as President, citing unresolved concerns about the veracity of the electoral process.
"The issues we raised have not been adequately addressed," he said. "One can conclude that they (Kenya's Independent Electoral and Boundaries Commission) were not keen on taking our concerns seriously."
James Orengo, NASA party chief agent, described the process as a "disaster." "This has been an entire charade. The judgment is now out there in the court of public opinion."
Odinga, running as the NASA candidate, told CNN Thursday that he doesn't "trust" the paper forms from polling stations around the country that officials used to authenticate votes.
Odinga said the forms could have been "manipulated" before being returned to the capital. At a news conference Thursday, members of Odinga's party gave no evidence to support any claims of election tampering, citing only unnamed sources at the election commission.
In a letter released Friday morning, Chebukati, the chairman of the election commission, rejected the opposition coalition's evidence of election fraud, calling it "obviously and plainly falsified."
On Thursday, Chebukati said tampering with the election system "was attempted but did not succeed," without elaborating further.
Monitors urge calm amid fraud allegations
Earlier Friday, international observers called upon candidates to respect the final outcome
and resolve any poll disputes through legal avenues.
More than 400 international election monitors -- including officials from the United States and the EU -- were deployed across the country to monitor voting, the tallying process and part of the post-election period.
Former US secretary of State John Kerry, who served as an election observer for the Carter Center, said Thursday that while there were "little aberrations here and there," the election was not rigged.
"If anything was electronically fiddled with, there is a way to go back and absolutely ascertain what happened in the polling station," he said. "So by paper ballots, there is a protection of each and every Kenyan's vote."
Fears of violence
Peaceful elections in East Africa's largest economy would help provide stability to the region but allegations of vote rigging have sparked concern with some Kenyans fearing ethnic clashes similar to those triggered a decade ago.
More than 1,000 died in months of violence and bloodshed after Odinga -- who had been defeated by the then-President Mwai Kibaki -- claimed the 2007 election had been rigged.
Odinga and his party repeatedly called for calm this week as the final results were compiled.
Extra security forces have been deployed to the streets of Kenya's capital, Nairobi, interior ministry spokesman Mwenda Njoka told CNN. Additional police have also been installed at the airport in the western city of Kisumu as a preventative measure, according to Reuters.
Nairobi remained quieter than usual after the national holiday on Tuesday. Some businesses were open in the city center but mostly people were remaining indoors; other residents who went to their home villages to vote might also have stayed away.
In Kisumu, a local journalist described the city center as "a ghost town."
At least two people died in election-related violence after brief protests broke out in several Odinga strongholds -- in Nairobi and Kisumu -- on Wednesday. The day before, a polling agent from Odinga's party was killed in a machete attack in Tana River county.
"We do not want to see any violence in Kenya. We know the consequences of what happened in 2008 and we don't want to see a repeat of that anymore," Odinga told CNN on Thursday.
"I don't control anybody. What is happening is that people just want to see justice. We also hope that the security forces are not going to use excessive force."