The contest between Odinga and Kenyatta was expected to be close, and emotions are high after a bad-tempered campaign marred by opposition claims of a plot to rig the vote.
Electoral Commission officials count ballots at a polling station in Nairobi. (AFP)
KENYA GENERAL ELECTIONS
LATEST LEADING PRESIDENTIAL RESULTS
Kenyatta: 7,708, 834 (54.43%)
Odinga: 6,332,685 (44.71%)
Kenya's opposition coalition rejected the preliminary results of the presidential election on Wednesday, calling them "fake" and disputing tallies that showed President Uhuru Kenyatta well on his way to being re-elected.
The allegation by Kenyatta's main challenger Raila Odinga set the stage for a protracted and possibly violent dispute over the results of Tuesday's election to decide the leader of east Africa's most vibrant democracy.
Similar allegations of voter fraud after the 2007 general election -- where Odinga made an unsuccessful bid for the presidency -- led to months of ethnically-driven political violence that killed 1,100 people and displaced 600,000.
Speaking to reporters, Odinga objected to partial results released by the electoral commission (IEBC) that show Kenyatta leading with 55 percent of the 11 million ballots counted against Odinga's 44 percent, a difference of nearly 1.3 million votes.
Odinga claimed the IEBC had not provided documents that would show how the tallies were arrived at.
"It is the machine that has voted," Odinga told reporters. "These results are wrong."
He alluded to the death of Chris Msando, a key administrator of a biometric voting system that the IEBC said would guard against fraud, whose tortured and strangled body was found on the outskirts of Nairobi earlier this month.
"We fear that this is the precise reason why Mr. Chris Msando was assassinated," Odinga said, referring to his fraud claims.
No backing down
Odinga, 72, is taking his fourth and likely final stab at the presidency. He claims the elections in 2007 and 2013 were stolen from him, and has occasionally said he could only lose this year's vote if it was rigged.
The IEBC was undeterred by Odinga's statements, with commissioner Roslyn Akombe saying that despite a request by an unnamed political party to stop publishing preliminary results, "as a commission we decided that as part of the commitment we made to the voters and the Kenyan people, transparency and accountability are part of them."
"This is why, as a commission, we have decided we will continue to display the results," she said.
The contest between Odinga and Kenyatta -- old foes who previously faced off when Kenyatta was first elected in 2013 -- was expected to be close, and emotions are high after a bad-tempered campaign marred by opposition claims of a plot to rig the vote.
Raphael Tunju, secretary-general of Kenyatta's Jubilee party, shrugged off Odinga's allegations.
"I don't expect anything else from NASA," he said, referring to Odinga's National Super Alliance party.
A quiet vote
Despite reports of some technical glitches and delays, Tuesday's vote went off peacefully, and the IEBC moved quickly to deal with any complaints.
A clerk in a polling station where ballot papers were pre-marked as "rejected," was fired, and police arrested another clerk in the port city Mombasa who was caught issuing double ballot papers to certain voters.
There was nothing that could be done about the weather in semi-arid northwest Turkana, where flooding from heavy rain cut off roads and several polling stations had still not opened by closing time.
Despite that, IEBC chief Wafula Chebukati said voting had gone "smoothly" despite minor delays and technical hiccups at some polling stations.
Shortly before polls closed, NASA put out a statement praising poll officials and security forces, but complained that some of its voters had been turned away.
The will of the people
Tuesday's general election was the first test of a new, complex election protocol that resulted from the devolution of power to Kenya's 47 counties after a post-conflict constitutional reform.
The presidential election is set to be the final showdown of a dynastic rivalry that has lasted more than half a century since the candidates' fathers Jomo Kenyatta and Jaramogi Odinga went from allies in the struggle for independence to bitter rivals.
The men belong to two of Kenya's main ethnic groups, Kenyatta from the Kikuyu, the largest, and Odinga from the Luo.
Both have secured formidable alliances with other influential communities in Kenya, where voting takes place largely along tribal lines.
Kenyatta, 55, is seeking re-election after a first term in which he oversaw a massive infrastructure drive and steady economic growth of more than five percent.
But he has been criticised for soaring food prices -- with prices jumping 20 percent year-on-year in May -- and massive corruption scandals on his watch.
On Tuesday, Kenyatta urged Odinga to accept the result should he lose.
"I also want to say that if I lose, I will accept the will of the people," Kenyatta said after voting.
ALSO RELATED TO THIS STORY
Kenya election: Voting as it happened