Hundreds of foreign observers, including former U.S. secretary of state John Kerry and former South African president Thabo Mbeki, as well as delegations from the European Union, are overseeing the election.
Voters queued at the polling stations as early as 1 am, with at least 4,500,000 of the 19,611,423 registered voters casting their ballots for the first time in their lives.
The leading candidates have avoided using inflammatory rhetoric that could fuel tensions ahead of the vote, worldwide election observers said.
Kenyatta and Odinga originate from opposing tribes.
Polls showed Odinga, 72, neck and neck with Kenyatta, 55, before Kenyans waited for hours to vote on Tuesday, with lines between tribal groups clearly drawn.
Reaction to the result could partly depend on the performance of Kenya's electoral commission, which will collect vote counts from more than 40 000 polling stations.
Some 19m voters will choose among 16,000 candidates for 1,882 positions-everything from president down to county-assembly member.
Branden Albert changes his mind about playing for Jaguars
Albert worked with the first-team offense on the first day of camp but Robinson took reps there in the next two practices. Albert hasn't played a full season since 2011 when he was with Kansas City, who selected him 15th overall in 2008.
Three polling stations in the Laikipia area were "affected by insecurity", but security forces restored order and polling resumed, Kenya's election commission said.
"There are attempts to manipulate the results", Odinga said.
If the front-runner falls short of those benchmarks, the two top contenders will contest a run-off vote.
By the end of voting, there were no significant reports of irregularities.
Results are not expected until Wednesday at the earliest, but with the predicted margin between the two leading presidential candidates razor thin, it could be several days before a victor can be declared.
He claims elections in 2007 and 2013 were stolen from him and right up until the eve of the vote, insisted that Kenyatta's Jubilee Party planned to rig Tuesday's presidential election.
If no candidate receives that, the election will go to a runoff, which would be a first in Kenya's history. "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.
To Kenneth Okoth, a member of parliament and a member of the opposition, things looked generally good, despite the fact that some of his constituents were not listed on the voter register.
Former South African president Thabo Mbeki, who heads an observer mission of the African Union, said observers would stay into the post-election period to witness the political environment and to intervene if the need arose.