Posted with permission from Voice of America

The head of Kenya's electoral commission announced Friday night that incumbent Uhuru Kenyatta had won this week's presidential contest, defeating opposition candidate Raila Odinga.

"Having fulfilled the requirement by law and having garnered 8,203,290 votes, representing 54.27 percent of the votes and 25 percent in 35 counties, I therefore wish to declare honorable Uhuru Kenyatta as president-elect and honorable William Ruto as the deputy president-elect," Chairman Wafula Chebukati said to a nearly full hall of election observers, dignitaries, journalists, politicians, political agents and electoral officials in Nairobi.

Chebukati said Odinga had received 6,762,224 votes, or 44.74 percent of the total. He also received at least 25 percent of the vote in 29 counties.

Electoral commission results showed a roughly 79 percent voter turnout, with more than 15 million Kenyans voting in an election with a pool of more than 19.6 million registered voters.

The winner of the presidential election must receive 50 percent of all votes, and 25 percent or more of votes in at least 25 of Kenya's 47 counties. If neither candidate had hit that threshold, a runoff would have taken place.  

Uhuru Kenyatta addresses the crowd after the announcement in the presidential race at the Centre in Bomas, Nairobi, Kenya, Aug.11, 2017. Uhuru Kenyatta addresses the crowd after the announcement in the presidential race at the Centre in Bomas, Nairobi, Kenya, Aug.11, 2017.

Shortly after the announcement, Kenyatta and Ruto adopted a conciliatory approach to the opposition.

"As with any competition, there shall always be winners and there shall be losers, but we all belong to one great nation called Kenya, and I extend a hand of friendship, I extend a hand of cooperation, I extend a hand of partnership, knowing fully well that this country needs all of us pulling together in order for us to succeed. And Kenyans want us to succeed," Kenyatta said.

Odinga's National Super Alliance (NASA) coalition, however, on Friday afternoon rejected the pending announcement, saying they would accept the results only if they were given access to data from the Independent Electoral and Boundaries Commission's website. They stood by their claims that the electoral commission's computer networks had been hacked.

On Thursday, the electoral commission chief confirmed there had been an attempt to hack the system after the vote, but he said that attempt had failed.

The opposition has said that its numbers showed Odinga beating Kenyatta by more than 600,000 votes.

WATCH: Uhuru Kenyatta Declared Winner of Kenya Election

"As a commission, they have made up their mind, they want to make a declaration, and therefore, we are saying that we are not going to be party to it, our issues have not been addressed. So as NASA, we shall not be party to the process that they are about to make," NASA leader Musalia Mudavadi said prior to the electoral commission's announcement.

Shortly after the announcement was made at 10:15 p.m., unrest was reported in some Nairobi slums, such as Kibera, Mathare, and Kawangware, as well as areas in western Kenya, such as Kondele in Kisumu. There were reports of gunshots and tear gas being fired.

A U.N. statement congratulated Kenyans "for exercising their democratic rights" in a peaceful manner and the IEBC "for all their commendable efforts in organizing and conducting these elections."

The election was held Tuesday, and officials spent the following three days certifying that electronic transmissions of results matched the official tallies signed by polling officers and political party agents before making the final announcement.