Kenya's Supreme Court has ordered the re-tallying of votes cast at 22 polling stations - out of 33,000 - in the 4 March presidential election.
The court said its agents would check whether the number of votes was higher than the number of registered voters.
Defeated candidate Raila Odinga says the result was manipulated to give Uhuru Kenyatta victory - a charge election officials deny.
Mr Kenyatta passed the 50% mark for outright victory by about 4,100 votes.
The BBC's Frenny Jowi in the Kenyan capital, Nairobi, says while only 22 polling stations are affected, the ruling is significant because of the narrow margin by which Mr Kenyatta avoided a run-off.
He won by 50.07% to Mr Odinga's 43.31%.
Under Kenyan law, the court has until Saturday to decide whether or not to confirm Mr Kenyatta's victory.
Mr Kenyatta - the son of Kenya's founding leader Jomo Kenyatta - is due to stand trial at the at the International Criminal Court (ICC) in July on charges of crimes against humanity, following claims that he orchestrated violence after the last election in 2007.
He denies the allegation, and his lawyers have asked judges to throw out the case.
Mr Odinga's Coalition for Reforms and Democracy (Cord) says his votes were "tampered with and reduced", while the number of ballots cast for Mr Kenyatta was inflated.
Chief Justice Willy Mutunga said the court would be impartial in its verdict.
"You must trust us to do our jobs," he said.
The Independent Electoral and Boundaries Commission (IEBC) says it is confident that the final result was credible.
The court also ordered the IEBC to provide the voter registration list it used when tallying the presidential vote after an electronic system used to count votes broke down, causing massive delays and confusion, AFP news agency reports.
The election was largely peaceful, unlike in 2007-08 when some 1,000 people were killed after the results were announced.
Mr Odinga also lost that election, claiming it had been rigged in favour of outgoing President Mwai Kibaki.
The violence ended after he and Mr Kibaki agreed to form a coalition government.
Mr Odinga was appointed prime minister and Mr Kenyatta, who backed Mr Kibaki, the deputy prime minister.