"The question is not whether or not they will accept the result but what they will do when they don't accept it", said Nic Cheeseman, professor of African politics at Birmingham University in England.
Why are Kenyans nervous about the election?
Results are expected to start trickling in by Tuesday evening and by Wednesday evening, the country's next president will be known, although the electoral body will have seven days to officially announce the results.
Heavily booked buses are ferrying Kenyans back to their hometowns, for some in order to vote where they are registered, but for others it is due to fears of post-election violence in the areas where they live. Al-Shabab militants have vowed they will disrupt Kenya's elections Tuesday. The closest he got was prime minister, after the 2007 elections results were disputed to such an extent that it brought the country to the brink of a civil war.
"People who were still voting at 6pm local time in many cases would have to stay the night at that polling station and only leave in the morning once that curfew was lifted", she said.
Kenyan officials have deployed about 180,000 security officers nationwide to ensure safety.
Six other candidates are also in the race to State House. Kenyatta is widely seen as the candidate of the Kikuyu people, the country's largest ethnic group.More news: Disney Unveils Lighthouse Memorial Honoring 2-Year-Old Boy Killed By Alligator
More news: Google Pixel and Pixel XL get big discounts
More news: President, Vice President Greet Nation on eve of Raksha Bandhan
Kenyatta is promising to create more than one million new jobs in the country, which has the second biggest economy in the region. Running the poll costs some 49bn Kenyan shillings (about $480m); campaign spending may cost as much again, making Kenya's election more expensive per person than America's. Odinga, 72, also the son of a leader of the independence struggle, has cast himself as a champion of the poor and a harsh critic of endemic corruption.
Most political organising in Kenya is tied to ethnicity.
While Kenyatta is hoping to be re-elected based on his achievements, Odinga hinges his hopes on promises he has given, including free education from kindergarten to secondary school.
Sources at the polling centre say she arrived at 5.45pm, earlier than the official opening and left shortly before 10am soon after voting.
However, the opposition leader congratulated President Kenyatta for conducting an extensive campaign across the country.
He called on the nation to build confidence in its new constitution and avoid the "needless pain and agony" prompted by the violence that followed the 2007 elections, when many believed Odinga was rigged out of victory and 1,200 people were killed.
"We do not move on tribal lines", Kenyatta told a cheering crowd in the eastern town of Kitui on Thursday. Regardless of where he or she comes from, their tribe, their colour or their religion.
Around 19 million voters, half of whom are under 35, have been registered.