Kenya opposition presidential candidate Raila Odinga has said the electoral commission’s IT system has been hacked to manipulate the election results.
He rejected provisional results from Tuesday’s vote indicating a strong lead for President Uhuru Kenyatta.
Kenya’s election chief Wafula Chebukati said he had confidence in the system but the claims would be investigated.
There have been sporadic outbreaks of violence amid calls for calm from politicians.
One person has been killed in a confrontation with police in the capital, Nairobi, witnesses have told the BBC, although this has been denied by the government.
Police have also fired shots at opposition supporters in Kisumu.
Many fear a repeat of the violence after the disputed election 10 years ago. More than 1,100 Kenyans died and 600,000 were displaced following the 2007 vote.
- Africa Live: Results and reaction
- Kenyatta: The digital president
- Odinga: Love him or loathe him
- Full election coverage
What do provisional results say?
Raw polling data published on the website of the Independent Electoral and Boundaries Commission (IEBC) says that with 95.3% of results in, Mr Kenyatta is leading with about 54.3%, to Mr Odinga’s 44.8% share of the vote.
These results mean Mr Kenyatta appears to be heading for a first-round victory. But they are not officials results, Mr Chebukati said, as Forms 34A – filled in by presiding officers to tally votes at polling stations – have not yet been checked against the results the IEBC has already declared.
The commission has not said when it will publish the final results. Legally, it has to announce the results within seven days of polling stations closing.
In order to avoid a run-off, a candidate needs 50% plus one of the votes cast and at least a 25% share of the vote in 24 of Kenya’s 47 counties. There were eight candidates in all, but apart from Mr Kenyatta and Mr Odinga, none polled more than 0.3% of the vote.
Mr Kenyatta won 50.7% of the vote at the last election in 2013, narrowly avoiding a run-off.
What have observers said?
There is “nothing to suggest that the election has not been free, fair and transparent”, Thabo Mbeki, Head of the African Union Observer Mission, said – adding that the judiciary is well-prepared to deal with any electoral disputes that may arise.
Local election observers say they are unable to support or dismiss Mr Odinga’s claims, as they are yet to complete their parallel vote tally.
The EU observer mission has yet to comment.
How have Kenyans reacted?
Speaking at a press conference Mr Odinga, who heads the National Super Alliance (Nasa), said his supporters should remain calm, but added: “I don’t control the people”. The opposition may call for “action” at a later date, his deputy, Kalonzo Musyoka, said.
Opposition supporters have protested in the Mathare slum, one of Mr Odinga’s strongholds in the capital, Nairobi.
Meanwhile, in the opposition stronghold of Kisumu, in western Kenya, a BBC reporter saw a group of several hundred of his supporters take to the streets shouting: “No Raila, no peace”.
They were then dispersed by police using tear gas.
However, these appear to be isolated incidents.
Speaking to journalists in the capital, Nairobi, Internal Security Minister Fred Matiang’i urged Kenyans to continue with their normal activities, saying he had not received any reports of unrest following the vote.
He also said that social media access could be restricted if it “threatens the security of the country”.
What is Mr Odinga’s complaint about the vote?
Mr Odinga said in a tweet that his party’s own assessment put him ahead of Mr Kenyatta.
He said that the hackers had gained access to the IEBC computer system by using the identity of the commission’s IT manager, Chris Msando, who was killed last month.
He alleged that the hackers had “loaded an algorithm” that allowed them to alter the results and ignore the figures being transmitted from tallying centres around the country.
Analysis: Dickens Olewe, BBC News, Nairobi
Mr Odinga’s allegations are likely to move the country into a state of heightened tension.
His decision to evoke the name of the murdered electoral commission’s IT head will bolster the views of people, mostly his supporters, who have been concerned about the credibility of the election.
All eyes are now on the IEBC, which on Tuesday was being praised for overseeing a largely successful voting exercise.
The commission now has the tough task of convincing anxious Kenyans that it has stuck to the promise of delivering credible and accountable elections.
What does the electoral commission say?
The electoral commission says it will look into Mr Odinga’s claims, but urged people to wait calmly for the full results of Tuesday’s vote.
“During this critical phase, we urge all Kenyans to exercise restraint as we await official results from the polling stations and indeed as they start trickling in,” the commission said.
However, it admitted that a lack of mobile data coverage had delayed the delivery of the supporting documents.
There had been reports on election day of the failure of some voter-identification equipment.
Also, one in four polling stations were without strong mobile phone coverage, meaning that officials were asked to drive to the nearest town to send results.
The presidential candidates’ agents would have “special access” to the forms, though, the electoral commission said.
How did the voting go?
Voting passed off largely peacefully with long queues at many polling stations, some of which remained open after the scheduled 17:00 (14:00 GMT) closing time.
But there was one heartening moment when a woman gave birth to a baby girl as she queued in West Pokot to cast her ballot. New mother Pauline Chemanang called the circumstances of the birth a “blessing” and called her baby Kura, Swahili for “ballot”, according to local radio.
What is at stake?
Mr Kenyatta is hoping for a second term in office.
Voting for the national and local assemblies has also been taking place.
Mr Odinga, 72, has run for president three times and lost each time. President Kenyatta, the 55-year-old son of Kenya’s founding president, narrowly beat him in the last election in 2013, but their rivalry is generations old – their fathers were political opponents in the 1960s.
Mr Kenyatta and his running-mate William Ruto were indicted by the International Criminal Court for their alleged roles in the bloodshed a decade ago. The case ultimately collapsed due to lack of evidence, and after key witnesses died or disappeared.
- Six separate ballot papers: For president, national assembly, female representatives, governors, senate and county assemblies
- 47 parliamentary seats and 16 senate seats reserved for women
- Eight presidential candidates: President Uhuru Kenyatta and opposition leader Raila Odinga are favourites
- Kenyatta beat Odinga in 2013 – their fathers were also political rivals in the 1960s
- A candidate needs 50% plus one vote for first-round victory
- More than 14,000 candidates running across the six elections
- More than 45% of registered voters under 35
- Some 180,000 security officers on duty nationwide in case of trouble