Uhuru Kenyatta opened an early lead as Kenya continued the count on Tuesday in a presidential election that brought out millions of voters despite pockets of violence that killed at least 15 people.
Kenyans, who waited patiently in long lines, hope the vote will restore the nation's image as one of Africa's more stable democracies after tribal blood-letting killed more than 1,200 people when the result of the 2007 vote was disputed by rivals.
Early tallies from Monday's broadly peaceful voting gave an edge to Kenyatta, the 51-year-old deputy prime minister, over rival Prime Minister Raila Odinga, 68.
That lead could still be overhauled because it was based on a count from just over 20 percent of polling stations, provisional figures from the election commission indicated. Final results are likely to be announced later on Tuesday.
Election officials had said turnout was more than 70 percent of the 14.3 million eligible voters but have not given a precise total.
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 he faces charges of crimes against humanity at the International Criminal Court (ICC) related to the violence five years ago.
For an outright victory, a candidate needs more than 50 percent of votes cast, otherwise the top two face a run-off, provisionally set for April.
Odinga may be facing his last crack at the presidency after narrowly missing out in 2007 to now-outgoing President Mwai Kibaki. Losing to Kenyatta, the son of Kenya's first president after independence would mark another defeat in the family's ambitions after Odinga's father also failed to secure the top post.
Odinga and Kenyatta ran neck-and-neck in polls before the 2013 race, well ahead of six other rivals.
'People want peace'
"If elected, we will be able to discharge our duties," Kenyatta's running mate, William Ruto, who also faces charges of crimes against humanity, said during voting. "We shall cooperate with the court with a final intention of clearing our names."
At a news briefing after most polls had closed, Ruto said the vote had been "free, fair and credible", and welcomed the early lead by Kenyatta.
The party of Odinga, who had raised questions about preparations for the vote before Monday but still said he would win, issued comments suggesting they might challenge the result.
Citing late voting at one polling station hours after the official close, voters casting more than one ballot in some areas and a failure of the electronic voter registration system in places, Frank Bett, a senior official in Odinga's CORD alliance, said: "These we find to be placing in jeopardy the credibility of this process."
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.
Kenyans queued from the early hours of the morning to cast their ballots and many said memories of the post-2007 bloodshed and its dire impact on the economy were enough to prevent a repeat this time.
"People want peace after what happened last time," said Henry Owino, 29, a second-hand clothes seller who was voting in Nairobi's Kibera slum where violence flared five years ago. "This time the people have decided they don't want to fight."
The real test will come when final results emerge. At least 15 people were killed in attacks by machete-wielding gangs on the restive coast shortly before voting started.
Senior police officers blamed the attacks on a separatist movement, suggesting different motives to the ethnic killings that followed the 2007 vote.
The European Union observer mission said turnout was high even at the coast where the attacks took place.
Nervous African neighbors
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.
Two civilians were shot dead in Garissa on Sunday, while a bomb blast in the Mandera area near the border wounded four.
One of the coastal attacks on Monday took place on the outskirts of Mombasa and another in Kilifi, about 50 km (30 miles) to the north. Police blamed a separatist movement, the Mombasa Republican Council (MRC), which wanted the national vote scrapped and a referendum on secession instead.
At the Kilifi site, a piece of paper lay on the ground with the words: "MRC. Coast is not Kenya. We don't want elections. We want our own country."
But the group's spokesman denied responsibility and said it only sought change by peaceful means.
Kenya's neighbours have been watching nervously, after their economies suffered five years ago when violence shut down regional trade routes.
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.