Supporters of Kenya's President Uhuru Kenyatta ride around and cheer, some holding a placard of Kenyatta, as they await his arrival as part of a campaign tour, in Githurai on the outskirts of Nairobi, Kenya Monday, Oct. 23, 2017. Kenyatta said Monday the presidential election must go ahead as planned on Thursday, despite a boycott by the main opposition candidate and the chief electoral officer's recent statement that he cannot guarantee that the polls would be credible.
Kenya braces for repeat presidential election
02:25 - Source: CNN
CNN  — 

It’s deja vu for voters in Kenya who return to the ballot box on Thursday for a presidential election do-over – after the result of the first ballot on August 8 was overturned amid allegations of vote-rigging.

The election and the controversial re-run have been marred by the mysterious killing of an election official, claims of vote fixing, death threats and violent protests. Here’s how we got to Thursday’s vote:

The murdered election official

Ahead of the August election, polls indicated a tight contest between the two frontrunners, incumbent President Uhuru Kenyatta and his longtime rival Raila Odinga.

The country’s electoral commission – the Independent Electoral and Boundaries Commission (IEBC) – implemented a new system to transmit results saying it would help to prevent any potential rigging efforts. It also used biometric voter registration to stamp out duplicate or “ghost” voters.

But just days before the vote, Christopher Msando, the IEBC official in charge of this technology, was found dead. His killing sparked shock and condemnation, but the perpetrator’s identity and motives remain a mystery. The murder renewed concerns about Kenya’s ability to deliver a credible election.

The disputed vote

kenya election day wrap sevenzo_00002317.jpg
Vote count begins in Kenya's election
01:54 - Source: CNN

Despite some concerns over violence, voting day came and went relatively peacefully with a high turnout – lines of enthusiastic Kenyans snaked from polling stations across the country all day.

Over 400 election observers were deployed across Kenya and most noted that there were “aberrations here and there” but said there were “no signs of centralized or localized manipulation.”

Kenyans were asked to remain calm as the preliminary results started to filter in but, as the hours passed, those preliminary electronic results became a second source of problems for the troubled ballot.

Almost immediately Odinga’s opposition National Super Alliance (NASA) called foul when early numbers – markedly different from pre-election polling – indicated that Kenyatta was comfortably ahead in the results tally.

NASA politicians provided no evidence to support their allegations of election fraud, and three days later Kenyatta was declared the winner, giving him a second five-year term.

The hacking claims

amanpour odinga interview
Kenya Opposition Leader claims election was hacked
04:56 - Source: CNN

Odinga and his party argued they had proof of widespread irregularities in a series of news conferences, saying hackers had managed to infiltrate the IEBC systems, using the stolen identity of murdered electoral official Msando, and altered the numbers in Kenyatta’s favor.

Small pockets of violence broke out in opposition strongholds, leaving at least 24 people dead and stoking fears that disgruntled supporters could take to the streets, in scenes reminiscent of 2007’s post-election violence in which more than 1,000 people were killed.

Wafula Chebukati, chairman of the voting authority, denied any tally manipulation but did confirm an attempted hack of the commission’s system had been unsuccessful.

“The commission has responded to the claims by (the National Super Alliance). Preliminary reports show hacking was attempted but did not succeed,” Chebukati said, without elaborating further on the failed hack.

The election result is nullified

Supporters of opposition leader Raila Odinga kneel down and thank God as they celebrate after hearing the verdict, on a street opposite the Supreme Court in downtown Nairobi, Kenya Friday, Sept. 1, 2017. Kenya's Supreme Court on Friday nullified President Uhuru Kenyatta's election win last month and called for new elections within 60 days, shocking a country that had been braced for further protests by opposition supporters. (AP Photo/Ben Curtis)
Celebrations after new election announced
00:51 - Source: CNN

Odinga urged his base to show restraint and issued a legal challenge to the result. In an unprecedented move that surprised observers, Kenya’s Supreme Court upheld his petition a month later, nullifying Kenyatta’s win.

The ruling marked the first time a court in Africa invalidated the re-election of a sitting leader.

The court criticized Kenya’s independent voting body for failing to provide information on the IT system’s firewall configuration, among other court requests.

Justice Philomena Mwilu said the IEBC’s refusal to provide access left the court “no choice but to accept the petitioner’s claims that the IEBC’s IT system was infiltrated and compromised, and the data therein interfered with, or IEBC’s officials themselves interfered with the data.”

Chief Justice David Maraga ordered fresh elections to be held within 60 days, but did not elaborate on any specific reforms the voting body needed to implement before another round of voting.

Odinga called the move historic for Kenya and the rest of Africa. But after initially appearing to accept the decision, Kenyatta asserted there was a problem with the judiciary and he was going to fix it.

The opposition candidate quits

Kenya's opposition leader and presidential candidate of the National Super Alliance (NASA) coalition, Raila Odinga speaks during a press conference on October 9, 2017 in Nairobi. 
Opposition leader Raila Odinga, has called for protests this week, reiterated that he would not take part in a re-run of the presidential election on October 26 if his demands are not met, as Kenya's Supreme Court last month overturned the August election of President Uhuru Kenyatta citing "irregularities" in the counting of results. / AFP PHOTO / SIMON MAINA        (Photo credit should read SIMON MAINA/AFP/Getty Images)
Major candidate quits Kenyan election re-run
01:19 - Source: CNN

While the high court ruling appeared to offer vindication for Odinga, the opposition leader astonished the country in early October by quitting the re-run scheduled for October 26, citing the IEBC’s refusal to reform.

“We have come to the conclusion that there is no intention on the part of the IEBC to undertake any changes to its operations and personnel to ensure that the ‘illegalities and irregularities’ that led to the invalidation of the 8th August (vote) … do not happen again. All indications are that the election scheduled for 26 October will be worse than the previous one,” Odinga’s NASA party said in a statement.

The electoral commission’s problems were compounded when one of its senior members fled to the US, telling the BBC she had received numerous death threats and did “not feel safe enough to be able to go home.”

In a statement issued from New York last Tuesday, she described the IEBC as “under siege” and said it could not guarantee a credible presidential election within the next week. Fellow commissioners had become increasingly partisan, coming to meetings “ready to vote along party lines,” she said, and were unwilling to “be frank with the Kenyan people.”

Tribal bonds remain stronger than national identity in Kenya, where over 40 different ethnic groups have been designated. Kenyatta hails from the country’s largest community, the Kikuyu. Mostly originating from Kenya’s central highlands, the Kikuyu have long wielded strong economic and political power within the country. Meanwhile Odinga is of the Luo tribe, which some say have become increasingly marginalized during Kenyatta’s time in office.

Wafula Chebukati, the IEBC chairman, subsequently warned that he had no faith the country could deliver a fair election and called for Kenyatta and Odinga to meet and discuss their issues with the new election.

The election re-run

Kenya's opposition leader Raila Odinga at a political rally in Kisumu last Friday.

The International Crisis Group, an independent think-tank, suggested the IEBC should delay the vote to avoid further political crisis and ensure the safety and security of voters.

“The IEBC should seek a limited postponement to allow sufficient time to prepare for an election that both main parties contest. Kenya’s political leaders should support such an extension and commit to participate in a new vote,” it said.

Activists filed a last-ditch petition to halt the upcoming vote, arguing that the majority of voters would not be part of the process because they were sitting out of the election in line with the opposition’s call. But Chief Justice Maraga said the emergency challenge could not move forward as only two justices were available.

Observers will be keenly watching how Thursday’s election plays out. Any unrest in Kenya could have ripple effects far beyond the nation of 47 million people.

As the largest economy in East Africa, Kenya is a crucial trade route to the continent and provides an important buffer of stability in a region that includes the fledgling Somali government and the politically tense Sudan and South Sudan.

CNN’s Stephanie Busari contributed to this report.