The election of Tuesday brought out millions of voters despite pockets of violence that killed at least 15 people.
Kenyans, who had waited patiently in long lines to vote, hope the poll will restore the nation's image as one of Africa's most stable democracies after tribal blood-letting killed more than 1 200 people when the result of the 2007 vote was disputed.
Partial tallies from Monday's broadly peaceful voting in the presidential election gave the edge to Kenyatta, the 51-year-old deputy prime minister, over his rival, Prime Minister Raila Odinga (68).
Kenyatta's lead held through counting overnight but could still be overhauled with about two-thirds of polling stations still to report.
The election committee said counting might not be completed till Wednesday, delaying any official announcement.
"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."
But the real test will be whether the final result, when declared, is accepted or disputed and whether candidates or their backers turn to the street or court to raise challenges.
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 Islamist militants.
They also worry about what to do if Kenyatta wins, because he faces charges of crimes against humanity at the International Criminal Court (ICC) related to the violence five years ago.
Some jitters ease
Investors breathed a sigh of relief after the broadly peaceful voting, strengthening the Kenyan shilling against the US dollar.
Analysts said a first-round victor would be welcomed by investors by averting a run-off, which would prolong uncertainty.
The inspector general of Kenya's 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.
Kenyatta's lead of 54% of votes counted so far to Odinga's 41% puts him in a good position for a straight win but his lead could be eroded with just 4.2-million tallied by 9am, provisional figures by the election commission showed.
Election officials said turnout was more than 70%, suggesting about 10-million or more votes need to be counted in the nation of 14.3-million eligible voters.
Officials did not give a precise total for votes cast.
Run-off election
For outright victory, a candidate needs more than 50% of votes cast, otherwise the top two face a run-off election, tentatively set for April depending on any legal challenges.
Odinga and Kenyatta ran neck-and-neck in pre-election polls.
"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".
He also said during voting: "We shall cooperate with the court [ICC] with a final intention of clearing our names."
Voting irregularities
But the party of Odinga, who had before the election suggested preparations for the poll had put him at a disadvantage, hinted that they might challenge the result, alleging voting irregularities.
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 earlier 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.
Nervous neighbours
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.
Losing to Kenyatta, the son of Kenya's first president after independence in 1963, would mark another defeat in his family's ambitions after Odinga's father also missed out on the top post.
Kenyans said memories of the post-2007 poll bloodshed and its dire impact on the economy were enough to prevent a repeat this time.
Kenya's African neighbours, whose economies felt the shockwaves, have been watching intently.
At least 15 people were killed in two attacks by machete-wielding gangs on the restive coast hours before voting started on Monday.
High turnout
Police officers blamed them on a separatist movement, the Mombasa Republican Council (MRC), suggesting different motives to the ethnic killings after the 2007 vote. MRC denied any role.
The European Union observer mission said turnout was high even at the coast where the attacks took place.
A suspected grenade attack struck near an election centre in the eastern town of Garissa close to the border with Somalia, where Kenyan troops have been deployed to fight Islamist militants.
That attack caused panic among voters but no injuries, a government official said.
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, speed up counting 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. – Reuters