Kenyans have gone by the millions on Monday in their first presidential election since a disputed 2007 poll unleashed weeks of tribal bloodshed.
Although in most of the East African country the process has been peaceful, violence erupted near the port town of Mombasa and at least 15 people were killed in attacks by machete-wielding gangs on the election day.
As the day wound down, polling sites started closing and counting of votes has started.
Preliminary results suggested the two main presidential candidates were far ahead of the rest of the field.
From those provisional results, Uhuru Kenyatta had a lead over Prime Minister Raila Odinga, although analysts cautioned that these results came from Kenyatta strongholds.
The two front-runners were well ahead of the other presidential candidates.
Mr Kenyatta is due to face trial at the International Criminal Court (ICC) next month in connection with the widespread bloodshed that followed the disputed 2007 election. He strongly denies organizing attacks.
Mr Odinga says he was cheated of victory last time.
In the light of the tragedy that happened five years ago, officials and candidates have made impassioned appeals to avoid a repeat of the tribal killing rampages.
More than 1,200 people were killed when disputes over the poll result fuelled clashes between tribal loyalists of rival candidates, shattering Kenya's reputation as one of Africa's most stable democracies and bringing its economy, sub Saharan Africa's fourth-largest, to a standstill.
Senior police officers blamed the attacks on a separatist movement, suggesting different motives to those that caused the post-2007 vote ethnic killings that could limit their impact.
As in 2007, the race has come down to a high-stakes duel between two candidates, this time between Deputy Prime Minister Uhuru Kenyatta and Prime Minister Raila Odinga, the loser in 2007 to outgoing President Mwai Kibaki. Both contenders will depend heavily on votes from their tribes.