The petitioners
Raila told the apex court, which is now 11 years old, that he was rigged out by the Independent Electoral and Boundaries Commission (IEBC) .
Raila, 77, demanded scrutiny of IEBC's technical system , claiming that manual tallying could not be relied on.
The second petition was filed by Ruto's digital strategist Dennis Itumbi, former Gatundu South MP Moses Kuria and Florence Jematiah (Bomet Woman Representative). They wanted the court to determine what constituted rejected (spoiled) votes and whether rejected votes should be considered in determining the total number of votes cast.
The third petitioner - Africa Centre for Open Governance (AfriCog) - wanted the court to invalidate the results over alleged irregularities in voter registration, electronic voter identification, and tallying.
AfriCog, represented by lawyer Kethi Kilonzo, demonstrated to the court how IEBC violated the Constitution, denying Kenyans their right to choose their leaders.
The Supreme Court consolidated the cases.
The respondents in the 2013 petition
The respondents included Uhuru and Ruto as the beneficiaries of the alleged flawed presidential election. Ruto was represented by Katwa Kigen, while Uhuru was represented by Fred Ngatia.
Other respondents were IEBC, represented by Ahmednasir Abdulahi and IEBC chairperson Issack Hassan.
The Attorney General, the Law Society of Kenya and Katiba Institute, led by Yash Pal Ghai, applied to be included in the case as amicus curiae. The Supreme Court, which was formed after the Kriegler Commission placed a special requirement of fiduciary duty on the apex court concerning the 2007 post-election crisis, only allowed the AG.
The court, then headed by Chief Justice Willy Mutunga, dismissed the petitions and upheld Uhuru's win with 50.07 per cent against Raila's 43.31 per cent.
The Mutunga-led team said it found no irregularities during the partial recounting of votes in five of the 22 polling stations.
The ruling on March 30 added that the polls were indeed conducted in compliance with the Constitution.
Stay informed. Subscribe to our newsletter
They also added that the rejected votes should be included in calculating the final tallies in favour of each presidential candidate, calling on the members to pay for their costs.
"Some Kenyans think I am the one who decided the ruling and not the other six judges. A section of the CORD fraternity has never forgiven me," Dr Mutunga said then during an interview with KBC on August 10, 2021.
Other judges were Justices Philip Tunoi, Jackton Ojwang, Mohammed Ibrahim, Njoki Ndung'u, and Smokin Wanjala.
The former CJ defended the ruling, arguing that the Apex court upheld Uhuru's victory because they could not scrutinise all the results from the 33,400 polling stations.
"For me, the most hurtful allegation was that I had been bribed in the Presidential Petition. I did not know where to turn. I have never been offered a bribe in my life. I have no doubt in my mind that anybody who dares offer me a bribe, regardless of status, would be the first one I arrest under the Constitution and the laws of this land," Mutunga says in a Facebook note titled "The Judiciary demands justice from Kenyans."
Raila disagreed with the court but said the ruling was final, and Uhuru and Ruto were sworn in on 9 April 2013 in accordance with Article 141(2)(b) of the constitution of Kenya.
2017 petition
The former prime minister was back in the Apex court to protest against poll rigging after the August 8 elections. Uhuru got 8,223,369 votes while Raila had 6,822,812 votes. Ruto was a beneficiary of the win since he was Uhuru's running mate.
"We had said we would not go to court. But there was a clampdown on civil society and a determination to silence all voices that could seek legal redress, like AfriCOG and the Kenya Human Rights Commission (KHRC). We have now decided to move to the Supreme Court and lay before the world the making of a 'computer-generated' leadership," Raila said on August 22, 2017, after NASA filed a 25,000-page affidavit. He was accompanied by 20 top lawyers, headed by Siaya Senator James Orengo (now the Siaya governor).
Raila said the decision to go to court gave the Apex court a chance to either 'redeem itself' or, like in 2013, compound the country's problems.
The ODM leader told the Supreme Court that IEBC bungled the election by failing to follow the legal procedure to declare Uhuru the winner.
Raila said IEBC chair Wafula Chebukati, who was only eight months in office, declared Uhuru winner without physically receiving all Forms 34A, which was against the law. He added that the transmission of election results was flawed.
The Supreme Court , headed by David Maraga and other four judges, found his arguments valid to nullify the presidential results.
The supreme court judges called for a rerun in 60 days.
"A declaration is hereby issued that the presidential election held on August 8 was not conducted in accordance with the Constitution and applicable law, rendering the results invalid, null, and void," then Chief Justice David Maraga said.
Four judges backed the nullification; Maraga, Philomena Mwilu (Deputy Chief Justice), Smokin Wanjala and Isaac Lenaola.
Njoki Ndung'u and Jackton Ojwang said IEBC followed the law to declare Uhuru the winner of the 2017 presidential election. Mohamed Ibrahim did not hear the matter because he was unwell.
Justice Tunoi, who was among the judges who heard the 2013 presidential petition, had been replaced by Lenaola following his retirement.
Petitioners who tried to invalidate the October 26 presidential re-run
Human rights activists on November 15, 2017 asked the Supreme Court judges not to fear invalidating the presidential rerun.
Former Kilome MP Harun Mwau as well as human rights activists Njonjo Mue and Khalef Khalifa said there were irregularities which greatly affected the validity of the poll outcome.
"We know the elephant in the room, with people asking whether you can nullify an election a second time in light of public opinion that the country should not be taken to another circus of an election. But the court does not work for public opinion, so you can go ahead and nullify the election," their lawyer, Waikwa Wanyoike said.
Mwau's lawyers said failure by IEBC to conduct fresh nominations compromised the integrity of the entire electoral process.
On the other hand, lawyers representing human rights activists Mue and Khalifa said failure by the poll agency to conduct the polls in all 290 constituencies, violence and intimidation, lack of independence within the commission and massive irregularities witnessed before, during and after the repeat election compromised the poll process.
They added that Raila and Kalonzo Musyoka's withdrawal from the race, the failure to conduct the polls in 25 constituencies and the fallout between IEBC commissioners, leading to Roseline Akombe's resignation, compromised the election process.
"The basis is that the election was held in violation of the Constitution. When the August 8 presidential election was invalidated, it meant IEBC had to start the process afresh by conducting the nomination exercise," Mwau's lawyers Ben Musyoki and Mark Ouma argued in court.
Delivering his ruling Maraga said: "It is a mockery for the president and his government to demand that citizens obey its laws when they disobey the law themselves and expose members of the public to suffering as a result of the wilful defiance of court orders."
Raila later joined Uhuru following a handshake, elbowing out Ruto.
2022 polls
Raila filed a petition after Chebukati declared Ruto president-elect with 7,176,141 (50.49 per cent). The former PM got 6,942,930 48.85 per cent).
There were six other petitions before the Apex court.
The cases were heard by Martha Koome (Chief Justice), Mwilu (Deputy Chief Justice), Wanjala, Ndung'u, Lenaola, Mohamed Ibrahim, and William Ouko. Koome and Ouko are the latest to join the Supreme Court.
Koome replaced Maraga, while Ouko replaced Jackton Ojwang.