Mr. Odinga withdrew from the second election two weeks before the vote, arguing that the electoral commission could not oversee a free and fair process, and he called on his supporters to boycott. His name nevertheless appeared on the ballot, and he collected just over 73,000 votes, compared with nearly seven million in August.
Elections officials also cast doubt on the credibility of the process in the days before the vote. One commissioner fled the country and resigned, citing death threats and questioning the impartiality of the commission. The top elections official, Wafula Chebukati, warned a week before the polls opened that political interference in the commission’s work was likely to undermine the credibility and neutrality of the vote.
Mr. Chebukati backtracked on that criticism while announcing the results on Monday, declaring the process “free and fair.”
At least 14 people have been killed in election-related violence since the Oct. 26 vote, according to international officials, and more have been injured. The rights group Amnesty International said on Monday that it had documented at least four deaths and more than a dozen injuries since the election that it said were committed by the police, most of them in western Kenya.
Rights groups documented nearly 70 deaths that they said occurred at the hands of the police in the days after the August vote.
In his victory speech, Mr. Kenyatta boasted of his August victory and recast the Supreme Court’s nullification as an endorsement of his win.
“The numbers were never questioned,” Mr. Kenyatta said. “What the court questioned was the process of declaring my victory.”
On Saturday, violence broke out in the Kawangware neighborhood of Nairobi, where several people were wounded and a supermarket was burned down. Residents blamed people from Mr. Kenyatta’s ethnic group, the Kikuyu, from which he draws strong support.
One Western diplomat, who spoke on the condition of anonymity because of protocol, expressed concern that the violence had taken on a more ethnic overtone in the days after the election.
Martin Kimani, the director of the Kenyan national counterterrorism center, said that opposition supporters had provoked the violence. On Sunday, he accused Mr. Odinga of “dog-whistle politics” aimed at inciting ethnic violence and obstructing the vote.
“This is active sabotage of an election,” he said. “The dog whistle comes from the top, and the middle and lower levels act on it.”
Four counties in western Kenya, an opposition stronghold representing 1.6 million votes, were unable to participate in the second election. In some places on Election Day, opposition demonstrators erected roadblocks and intercepted ballot papers. In others, polling stations were blockaded, and protesters clashed with the police. Electoral officials at first delayed balloting in those counties and eventually canceled it completely, saying the outcome in those areas would not affect the overall result.
Mr. Odinga told his supporters last week that he would transform his party into a “resistance movement.” In speeches in Kawangware on Sunday, he pinned the violence there on his opponents.
“The killing here was very beastly,” he told a crowd gathered at a church. “The killing was well planned and executed,” he said, and was intended as “a direct warning to others.”
Mr. Odinga condemned the violence, which he described as perpetrated by Kenyatta supporters, but stopped short of urging his own supporters not to react with violence.
Kenyans, foreign diplomats and even some of Mr. Kenyatta’s own supporters have called on the president to engage with opposition leaders after his win, but in his victory speech the president distanced himself from dialogue.
“Those who want to ask me, ‘Are you going to engage in dialogue with so and so and so and so?’, let them first and foremost exhaust the constitutionally laid out processes,” Mr. Kenyatta said. “I am not going to jump the gun.”