Kenyan presidential hopeful Uhuru Kenyatta opened an early lead as the east African nation counted ballots on Tuesday in an election that brought out millions of voters despite pockets of violence that killed at least 15 people.
The deputy prime minister, who faces international charges of crimes against humanity linked to the last election, was ahead of Prime Minister Raila Odinga.
But Kenyatta could still be overhauled as the count goes on in a vote Kenyans hope will restore their nation's image as one of Africa's most stable democracies after the bloodshed five years ago.
Although voting passed off broadly peacefully with a big turnout, the real test will be whether the candidates and their backers accept the result, after the disputed 2007 vote touched off ethnic blood-letting that killed more than 1,200 people.
"Nobody should celebrate, nobody should complain," election commission chairman Isaac Hassan told journalists, saying work was going on to resolve glitches and speed up the count. "We therefore continue to appeal for patience from the public."
The commission says provisional results may not be tallied until Wednesday, meaning an official declaration will not come until then or later.
Kenyatta's lead has held overnight but more than 60 per cent of polling stations have yet to report. Odinga's camp said counting in their strongholds had not been completed yet and a debate over the fate of a sizeable number of rejected votes could help shift the balance.
The United States and Western donors have watched the vote closely, concerned about the stability of a nation seen as a regional ally in the fight against militant Islam.
They also worry about what to do if Kenyatta wins, because of the charges of crimes against humanity he faces at the International Criminal Court (ICC) related to the violence five years ago.
With memories still fresh about the lethal mayhem after the last election and its dire impact on the economy, many Kenyans are determined not to see a repeat and, like their candidates, have pledged to accept the outcome.
"People want peace after what happened last time," said Henry Owino, 29, a second-hand clothes seller who voted in Nairobi's Kibera slum where violence flared five years ago. "This time the people have decided they don't want to fight."
Investors breathed a sigh of relief after voting passed off broadly calmly, strengthening the Kenyan shilling against the U.S. dollar. Analysts said a first-round victor would be preferred to a run-off, which would prolong uncertainty.
The inspector general of the Kenyan police, David Kimaiyo, told a news conference he would not allow demonstrations anywhere in the country over the delay in releasing the election results because of concerns protests could turn violent.
According to the election commission's provisional tally, Kenyatta's lead of 54 per cent of votes to Odinga's 41 per cent counted by 1.40 p.m. local time based on a tally of almost 5 million votes, giving him a better chance of straight win, which requires a candidate to secure more than 50 per cent of votes.
But with turnout estimated by the election commission at more than 70 per cent, a total of about 10 million or more votes must be tallied in the nation of 14.3 million eligible voters. In no one wins outright, a run-off is tentatively set for April.
"There were a lot of jitters around the elections," said Dickson Magecha, a senior trader at Standard Chartered Bank. "But there are indications we might see a first-round victory, which is good for political risk, and the vote went on peacefully without any major hitches."
William Ruto, Kenyatta's running mate who also faces ICC charges of crimes against humanity, called the vote "free, fair and credible". During voting he said: "We shall cooperate with the court (ICC) with a final intention of clearing our names."
Odinga's party said it was still confident it would get back into the race as the counting continued, but also pointed to irregularities in the process, hinting at legal challenges ahead. Odinga had questioned preparations before the poll.
Frank Bett of Odinga's CORD alliance cited late voting at one polling station hours after the formal close, voters casting ballots more than once in some areas and a failure of electronic voter registration systems in some places. "These we find to be placing in jeopardy the credibility of this process," he said.
The election commission acknowledged a polling clerk had been caught issuing extra ballots and said manual voter lists were used where the electronic registration system failed. But it has said there were no significant problems in voting.
Raising the stakes in the race, Odinga could be facing his last crack at the presidency after narrowly missing out in 2007 to now-outgoing President Mwai Kibaki, who has served a maximum of two five-year terms.
Kenya's African neighbours, whose economies felt the shockwaves last time, have watched intently. Some landlocked states stockpiled fuel and other material, worried that Kenya's vital trade route could again be cut if violence flared.
But violence on election day was limited to pockets in the north and east of the country, with the worst on the coast.
At least 15 people were killed in two attacks by machete-wielding gangs in Mombasa region hours before the vote on Monday. Police officers blamed them on a separatist movement, the Mombasa Republican Council (MRC), suggesting different motives to the ethnic killings after the 2007 vote.
The MRC denied any role.
The European Union observer mission said turnout was high even at the coast where the attacks took place.
To try to prevent a repeat of the contested outcome that sparked the violence after the December 2007 vote, a new, broadly respected election commission is using more technology to prevent fraud and increase transparency.
Alongside the presidential race, there were elections for senators, county governors, members of parliament, women representatives in county assemblies and civic leaders.