On October 26, Kenya is supposed to head to the polls for the second time this year. The results of an earlier election on August 8 were nullified by Kenya's Supreme Court after allegations of widespread irregularities in the electronic transmission of vote results.

KENYA ELECTION TIMELINE:

July 31 - Body of manager with electoral commission found, reports of torture August 8 - Kenya votes in presidential election August 11 - Uhuru Kenyatta, who has served since 2013, announced winner August 11 - Protests in support of opposition candidate Raila Odinga turn violent September 1 - Supreme Court nullifies result of election, sets rerun for October 26 October 10 - Opposition candidate Odinga pulls out of rerun October 26 - Rerun scheduled to take place

Since the August 8 election, Kenya has seen massive protests and bouts of violence erupt in several parts of the country. Scores of people have died since then and main opposition leader Raila Odinga withdrew from the second round of elections because of a lack of electoral reform.

Amnesty International and Human Rights Watch say that at least 67 opposition supporters have been killed since August 11, when Uhuru Kenyatta was announced as the winner.

With one week until new elections are supposed to take place, the opposition has pledged more protests in the days running up to the crucial vote.

And in a surprise development on Wednesday, Roselyn Akombe, a senior official from the electoral commission, resigned and left the country, saying the poll lacks credibility.

How did we get here?

Days before the vote, tension soared as the body of Chris Msando, acting director for information and communications technology at the commission overseeing the election, was found in a forest near the capital. The opposition described his death as a "heinous murder", saying it was "gravely concerned" about its implications.

On August 8, Kenyans voted for a new president. More than 15 million people cast their vote, eventually leading to a victory for incumbent President Uhuru Kenyatta, who secured 54 percent. His main competitor, Raila Odinga, received almost 45 percent of the vote.

It was the first time Kenya used a new electronic voting system because, during previous elections, the electoral commission was often accusations of stealing votes.

In 2007, the opposition alleged voting fraud, leading to mass killings and displacement after incumbent Mwai Kibaki was declared the winner. At least 1,200 people died and 600,000 were displaced.

However, despite the new system in place, the opposition contested this year's results. Odinga claimed hackers infiltrated the database of the election body to manipulate the "democratic process".

"The system has failed," Odinga said. "We shall hold vigils, moments of silence, beat drums and do everything else to draw attention to the gross electoral injustices."

In the days following the vote, the opposition protested against Kenyatta's win. The rallies turned deadly the following week when police shot several pro-Odinga demonstrators.

Why did the Supreme Court nullify the result?

Odinga took his allegations of election fraud to the Kenyan Supreme Court, eventually leading to the court nullifying the result.

According to the Supreme Court, the board overseeing the 2017 vote did not have all the tally forms when they announced results. It also said that some forms lacked security features such as watermarks, signatures or serial numbers, which called their authenticity into question.

There were also several problems with the electronic voting system. The Independent Elections and Boundaries Commission (IEBC) refused the court full access to its computer system, which meant the opposition's claims of hacking could not be proved or disproved.

In a response to the annulment, incumbent President Kenyatta said he "personally disagreed" with the ruling but he would "respect it, as much as I disagree with it".

The court also decided that new elections should be held within 60 days of the decision. Originally, the date for the new elections was supposed to be October 17, the election commission said.

However, Odinga said he would only participate in the new vote if reforms were implemented. One of his main demands was replacing the head of the electoral commission. He also wanted a different company to take care of printing ballots.

"There will be no elections ... until the conditions that we have spelled out in the statement are met," Odinga said.

Plans to hold the vote on October 17 were scrapped because more time was needed to meet the Supreme Court's requirements, the electoral commission announced.

The rerun is now set for October 26.

If Odinga was unhappy with the result, why did he withdraw from the rerun?

Odinga supporters continued to protest, sometimes leading to violence. And on October 10, Raila Odinga officially withdrew from the planned election. According to the opposition leader, the electoral commission had failed to implement the necessary reforms.

"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 ... All indications are that the election scheduled for October 26 will be worse than the previous one," Odinga said.

Shortly after Odinga's withdrawal, Kenyan parliament passed a new law, which says if one candidate withdraws, the other automatically wins the presidency.

This led to renewed protests by Odinga supporters, which again turned deadly.

The government responded by banning further protests, citing safety concerns, but the opposition refused to comply.

What next?

{articleGUID}

Odinga's position has led to further confusion over the impending election.

The opposition leader said he might consider returning to the Supreme Court for clarification on whether the October 26 poll was legal.

"As far as we are concerned, [the original Supreme Court] ruling is still valid," Odinga said during a visit to London. "What we are demanding is that the electoral commission should respect the Supreme Court and carry out elections in accordance with the ruling."

Abdullahi Boru Halakhe, a Nairobi-based political analyst with Amnesty International, told Al Jazeera another decision by the Supreme Court seems inevitable.

"The country is divided and every camp is interpreting the Constitution the way that suits their interests. Each side is hoping that the law will be on their side when things go to court," Boru said.

"In one way or another, it looks like we will end up at the Supreme Court again," he said.