The six-judge bench led by Chief Justice David Maraga made the crucial ruling three weeks after the repeat elections.
The six-judge bench led by Chief Justice David Maraga in their unanimous judgment upheld Kenyatta's victory.
The ruling now paves way for President-elect Uhuru Kenyatta to be sworn in next week on Tuesday according to the constitution.
Two separate petitions had been brought before the apex court seeking to annul Kenyatta's victory.
Former Kilome MP Harun Mwau, activist Activist Njonjo Mue and a voter Khelef Khalifa had asked the court to nullify Kenyatta's win on grounds that there was low voter turnout and violence in some areas that saw the election not conducted.
The petitioners argued that failure by the IEBC to carry out election in the 25 constituencies was unconstitutional and that the voter turn-out was so low such that it cannot be said that those who came out to cast their votes, represented the whole country.
The petitioners had through lawyer Julie Soweto told the six-judge bench that they should not fear, but uphold the rule of law and constitutionalism by nullifying the poll once again as was the case in the August 8 election.
However Kenyatta through his lawyer Fred Ngatia dismissed the petition stating that there would be lack of a constitutional order by invalidating the poll outcome.
Ngatia and IEBC lawyer Kamau Karori argued that the commission made all its decisions guided by the law and the court.