The Kenyan election was "hacked" and the results at all levels represent a "massive and extensive fraud", the opposition leader Raila Odinga has said.

Mr Odinga called on his supporters to remain "calm", but at the same press conference deputy opposition leader Kalonzo Musyoka said the party may call for "action" at a later date.

The allegations of fraud on Wednesday followed the release of election results showing President Uhuru Kenyatta with a wide lead over Mr Odinga after votes from the vast majority of polling stations had been counted.

Mr Odinga claimed the alleged hackers "created errors" in the election commission's database and described Tuesday's election as a "fraud".

Mr Odinga also ran against Mr Kenyatta in the 2013 vote and unsuccessfully challenged the results in court with allegations of vote-tampering.

The long-time opposition figure also ran in the 2007 election, which was followed by violence fuelled by ethnic divisions that killed more than 1,000 people.

Election officials acknowledged early opposition concerns, but defended their actions in live-streaming results online as they came in from polling stations.

"We believe that by displaying results, we have been doing well to enhance transparency and accountability in the electoral process, consistent with the commitment the commission has made to the Kenya people," said commissioner Consalata Bucha Nkatha Maina, vice chairwoman of the election commission.

The commission's CEO, Ezra Chiloba, also said a results screen at the commission's counting centre had frozen because too much data was being received, and that tallies would be updated later Wednesday morning.

A similar situation with a systems failure in the 2013 election led to Odinga's legal challenge at the time, though Kenya's Supreme Court ruled in favour of Kenyatta by validating the results.

Kenyatta, the 55-year-old son of Kenya's first president after independence from British colonial rule, campaigned this year on a record of major infrastructure projects, many backed by China, and claimed strong economic growth. Odinga, 72, also the son of a leader of the independence struggle, cast himself as a champion of the poor and a harsh critic of endemic corruption.

However, many voters were expected to vote along ethnic lines. Kenyatta is widely seen as the candidate of the Kikuyu people, the country's largest ethnic group. Odinga is associated with the Luo voting bloc, which has never produced a head of state. There were six other presidential candidates, though they lack the wide support of the top two.

The winner of the presidential race must get more than 50 per cent of the votes as well as one-quarter or more votes in at least 24 of Kenya's 47 counties, according to officials. If the front-runner falls short of those benchmarks, the two top contenders will contest a runoff vote.

Former US Secretary of State John Kerry, who is the chief election observer for The Carter Center, described Tuesday's vote as "an inspiring day in Kenya watching democracy in action."

"Enthusiastic voters not fazed by long lines," he tweeted.