Kenya’s experience with bloody election-related violence in 2007 and 2008 inspired drastic electoral reforms that have seen the country pull through this year's election peacefully.
Key among the changes was the establishment of the Supreme Court under the 2010 Constitution with powers to resolve presidential election disputes, dissuading aggrieved parties from having to resort to violent street protests.
The country has also adopted technology in election management to improve transparency in voter identification and results transmission.
The first presidential election to be filed at the Supreme Court was by Raila Odinga challenging President Uhuru Kenyatta’s win in the 2013 election.
There were other petitions after the 2013 polls, including one by former Gatundu South MP Moses Kuria who challenged the inclusion of rejected votes into the final tally. Gladwell Otieno and Zahid Rajan also challenged President Kenyatta’s win.
Mr Odinga and Ms Otieno argued that the voter register was published five days to the election and there were variances between the manual and online registers.
The court was also told that the Independent Electoral and Boundaries Commission (IEBC) failed to ensure party agents signed results transmission forms and that there were discrepancies between results announced and those in transmission forms.
Mr Odinga who was the Coalition for Reforms (Cord) candidate in that election also accused the IEBC of failing to publicly transmit results during tallying and verification of votes.
After hearing the case, the Supreme Court presided over by Chief Justice Willy Mutunga upheld President Kenyatta’s win. The judges also allowed the petition filed by Mr Kuria saying rejected votes should not be included in the final tally.
Mr Odinga together with his running mate Kalonzo Musyoka also challenged President Kenyatta's re-election victory in 2017.
Among the complaints raised by the duo were that Mr Kenyatta and his running mate William Ruto used State resources in their campaigns and that there were inconsistencies in figures captured on forms 34A and 34B, compared to the results displayed at the national tallying centre.
The petitioners also argued that the electoral body used ungazetted polling stations with ungazetted returning and presiding officers in the elections.
Chief Justice David Maraga and three other judges of the Supreme Court in a landmark ruling nullified the election of President Kenyatta at the end of the hearing, stating that the election was not held in accordance with the applicable electoral laws and the Constitution.
The court directed the IEBC to conduct a repeat election within 60 days. The rerun was held in October 2017 but Mr Odinga boycotted it in protest after reforms he was pushing for at the electoral body were rejected.
President Kenyatta was declared the winner of the repeat poll and a second petition was filed by among others, former MP John Harun Mwau, Njonjo Mue and Khelef Khalifa.
The petitioners complained that there was no nomination of presidential candidates, the election was not free of violence and there was widespread corruption in the process.
There was also the complaint that elections were not held in 27 constituencies, largely in Mr Odinga’s stronghold areas but the Supreme Court dismissed the case.
In every election since the nullification of the outcome of the presidential election in 2017, courts have maintained that the electoral body must ensure that whatever voting method is used in the election is simple, accurate, verifiable, secure, accountable and transparent as per Article 86(a) of the Constitution.
Justice Maraga’s court also ruled that the results announced at the polling station are final and returning officers must submit Form 34As together with 34Bs to the national tallying centre, for the commission to generate Form 34C after verification from 34B and 34A.
Upon verification, the chairperson is supposed to record any errors noted on Form 34B and publicise the information but cannot change.
The court also barred the IEBC chairman from declaring a President-elect before receiving, verifying and tallying all the results from polling stations across the country.
Lawyer Charles Njenga said the major gains achieved through the presidential election petitions is the transparency of the whole process. The lawyer says after the 2017 presidential election petition, the IEBC was compelled to ensure that Kenyans can track the process.
“The 2017 election was impeached because the IEBC could not explain how the numbers were arrived at. But the electoral body has since then, improved and made sure that the process is as transparent as possible,” he said.
Lawyer Adrian Kamotho also believes that the process of conducting the elections in the country —from the identification of voters, voting and transmission of results — has improved with the IEBC ensuring that every step strictly follows the law.
“Courts have in a great way offered the country the opportunity to ensure how the process ought to be carried out. The judges have straightened up things making our elections one of the best in the region,” he said.
To Mr Kamotho, the Maina Kiai decision, which was emphasised by the Supreme Court in 2017, is a decision to be celebrated. In the decision, the court said the results announced at the polling station are final and not subject to change.
“Elections are won or lost at the polling stations and that is where the focus should always be,” he said.