“It’s been a long wait for the last couple of days. But we were determined that we would be patient and wait for the final result, as indeed have now been declared,” Kenyatta said following the announcement.

“We shall continue with the work that we have started…Kenyans want us to succeed.”

More than 15 million people cast their ballots representing 78 percent of the registered voters.

“Countries around the world have been watching us closely,” Wafula Chebukati, Kenya Electoral Commission chairman, declared.

Chebukati said that he was “confident” that the manner he election was conducted was “fair and credible”.

The announcement of the results was delayed for hours, after election officials said they needed time to review some documents from some polling districts.

Supporters of Kenyatta cheer as they hear the election results in downtown Nairobi [AP]

Opposition rejection

Shortly before the results were announced, opposition members said they will reject it.

“We are not going to be party to it. Our issues have not been addressed. One can conclude they [electoral commission] are not keen on taking our concerns seriously,” Musalia Mudavadi, a senior official of the National Super Alliance (NASA) and former Kenyan vice president, said.

James Orengo, another senior NASA official, called the election process a “charade” and a “disaster”.

“You do not just hold an election for the sake of it. And the election is not about announcing winners and losers,” he said.

On Wednesday, Odinga – a long time rival of Kenyatta who was running for the presidency for the fourth time – rejected the results of Tuesday’s election.

He claimed the country’s electronic voting system had been hacked and the results were doctored.

In a bid to unite the country after the heated campaign, Kenyatta reached out to Odinga and his supporters, saying, “We are not enemies”.

“We are all citizens of one republic. As with any competition, there shall always be winners, and there shall be losers. But we all belong to one great nation called Kenya. I extend a hand of friendship.”

As Kenyatta’s supporters celebrated his victory in Nairobi, Odinga’s supporters clashed with police, setting objects on fire to protest the result. Shots were also fired in the capital.

Previous disputes

Chebukati, the electoral commission chairman, said a hacking attempt had failed to manipulate the outcome of the vote.

International observers including the African Union said the election was free and fair and called on disputes to be resolved through the courts.

In 2013, Odinga lost to Kenyatta and claimed the results were manipulated but Kenya’s Supreme Court announced Kenyatta the winner.

Kenya election chief says ‘hacking attempt did not succeed’

In 2007 an opposition coalition led by Odinga disputed the result after incumbent Mwai Kibaki was announced the winner by the electoral commission.

The dispute led to a spate of ethnic violence that led to the death of 1,200 people and displaced some 600,000.

The violence stopped after Kibaki and Odinga agreed to form a coalition government.

Earlier on Friday, in Odinga’s stronghold of Kisumu, security forces blocked the main road to the capital Nairobi as young people gathered nearby and started burning tyres.

Shortly before the results came out police officers fired tear gas and rubber bullets to disperse protesters.

Kenyatta, son of the country’s founding father who in 2013 became Kenya’s youngest president, was seeking a second and final five-year term.

No sitting president has ever lost an election in the history of the East African country.

With additional reporting by Al Jazeera’s Hamza Mohamed. Follow him on Twitter @Hamza_Africa.