President Uhuru Kenyatta was named the winner of Kenya's general election, the country's electoral commission (IEBC) announced on Friday.
The incumbent president took 54.27 percent of the vote, securing a second and final five-year term.
Opposition opponent Raila Odinga received 44.74 percent of the vote, said IEBC chairman Wafula Chebukati after the commission painstakingly double-checked and announced the tally.
He also noted that voter turnout was at 78.9 percent in an election he described as "credible, fair and peaceful."
Following the announcement of the results, the newly re-elected Kenyatta called for unity and extended a conciliatory message to his opponent, saying: "I reach out to you and all your supporters."
"There is no need for violence. Politicians come and go, but your neighbor is your neighbor," Kenyatta said. "Let us move forward together."
Odinga had yet to react to the defeat, although he and his supporters have in the past week dismissed the entire election process as a "charade," accusing the electoral commission of overseeing massive vote rigging.
Reports of rioting and gunshots
Kenya had been relatively calm since the vote on Tuesday, but security forces braced for possible violence on Friday night after the results were announced.
Kenyatta supporters celebrated the commission's announcement in several cities throughout Kenya, but witnesses also reported rioting and looting taking place in Nairobi and other areas that strongly support the opposition, fueled by Odinga's claims of electoral interference.
Police fired tear gas to contain political protests in the western opposition stronghold of Kisumu city as well as Mathare, a Nairobi slum, witnesses told Reuters news agency.
Correspondents with AFP news agency reported that cars were being set on fire and businesses were being attacked in the Nairobi slum of Kibera. Another witness told the Associated Press (AP) that gunshots had been heard and that youths were stoning cars in Kibera, as well.
The AP newsagency also reported of gunfire ringing out in the southwestern city of Kisumu.
Tuesday's contested vote has caused tension across Kenya with many fearing a repeat of ethno-political violence that followed the 2007 election. Around 1,200 people were killed and hundred thousands were displaced after political protests led to ethnic killings.
By comparision, this week's election has seen three people killed in clashes with security forces.
Opposition calls process a 'charade'
Kenya's opposition said earlier on Friday that it would "not be a party" to the commission's election announcement because its concerns about the election had not yet been addressed.
Top opposition official James Orengo denounced the vote counting process as a "charade." He added though, that the opposition doesn't plan on contesting the vote in court.
"Going to court for us is not an alternative," Orengo said. "We've been there before." He didn't say what measures, if any, the opposition might take.
Odinga and the opposition National Super Alliance have said they would only accept the results if allowed to access the election commission's servers to audit raw data from the country's 41,000 polling stations.
The alliance has claimed that the results were manipulated in a massive hacking attack, while also saying it has obtained results that are being concealed on IEBC servers that indicate Odinga is the rightful winner.
The IEBC said earlier this week that a hacking attempt had been made but that its system was not compromised.
The opposition also criticized foreign observer missions, which included former US Secretary of State John Kerry and former South African President Thabo Mbeki, saying they should have been vetted prior to the vote.
The delegation of international observers said they found no instances of alleged interference with the vote counting, and praised the IEBC for maintaining a credible and mostly peaceful voting process.
rs/msh (Reuters, AFP, AP, dpa)