Raila Odinga, leader of the National Super Alliance and Kenya's opposition is petitioning the Supreme Court for a review of the results of the 2017 election, easing the political pressure that has kept the country in suspended animation for the last week.

On the morning of August 9th, about 12 hours after results started trickling on the Independent Election and Boundaries Commission (IEBC) results transmission website, leader of the largest opposition coalition Raila Odinga claimed that the website had been hacked to under-represent his share of the vote. On Friday, at 10:30 pm, the chairman of the IEBC, Wafula Chebukati, declared Uhuru Kenyatta the winner triggering a flurry of protests in Nairobi and Kisumu. According to the Kenya National Commission on Human Rights at least 24 people have died.

Kenya's elections generally have three phases. First, there is a jittery pre-election phase peppered with accusations of malpractice; second, a peaceful and even joyous voting phase; and third, an anxious wait for final results and the inevitable fallout.

The contrast in mood between the voting phase and the pre- and post-election phases is always stark: a 24-hour window of euphoria sandwiched between interminable anxiety. The recent elections were no different - on Monday, there was tension over a litany of unresolved issues, on Tuesday voting was smooth and turnout impressive, but by Wednesday there was tension in the air and this elections' counting dispute began.

How can a country be so good at voting and so bad at counting votes?

The tension stems from a lack of trust: Kenyans don't trust elections because our elections are untrustworthy. Successive iterations of electoral commissions have delivered suspect results. In 1992, then President Daniel Toroitich arap Moi was declared winner over Kenneth Matiba in an election that established a link between violence and voting (PDF) in Kenya. Arguably, Matiba won that election, but Moi was declared winner. This pattern was repeated in 1997, in a violent election that saw Moi defeat Mwai Kibaki under questionable circumstances.

OPINION: The murder that shook the Kenyan elections

To date, the only election in Kenya's multi-party era that has not faced validity challenges was the 2002 election, as the patterns of 1992 and 1997 repeated in 2007 and 2013. The 2007 election especially soured voters on electoral commissions, as a hurried result was announced in the shadow of grave allegations of fraud made on live television. Instead of assuaging the public's fears by having a transparent recount, the president was quickly sworn in at night and a major trust deficit was born that has never been fully addressed.

But the lack of trust between voters and the electoral commission isn't even the most significant. There are plenty of other institutions in Kenya that operate with a trust deficit, but that do not trigger violence.

Elections week in Kenya is a flurry of accusations, obscure legislation and new found importance of faraway places that most Kenyans can't find on a map, resulting in general unease even though few voters can articulate why.

In fact, it is the lack of trust between various political actors that is Kenya's biggest problem, and Kenya's politicians don't trust each other because they are cut from the same cloth. The main political figures in Kenya haven't changed much since 1990.

Uhuru Kenyatta and William Ruto on one hand, and Raila Odinga and Kalonzo Musyoka on the other, all served in Moi's government. Each of the "four principals", as they are known in Kenya, has been active in government during a rigged election. As political alignments have shifted over the last 25 years, protecting oneself against the scheming of the other side has become the main election strategy, rather than talking about the issues, for instance.

The more these individuals find perceived gaps in the election architecture, the more law is grafted on to the system to make it appear airtight. Each check and balance is given a check and balance, but it makes little sense as a collective unit.

What's the point of insisting that a result is only based on forms 34A if nearly a week after the result was announced the commission still can't produce all the forms as required by law?

Why insist that only the announcement by the commission would be final and prohibit media from declaring any result before the final one only to provide a glitchy website with a running tally?

Nor are these checks and balances cheap or easy. Even though Kenya only had 19.2 million voters this year against the United States' 200 million or India's 814 million, at $25 per capita Kenya's 2017 election was probably the most expensive in the world.

Both parties hired foreign IT and political consultants, although the opposition found theirs deported under dubious circumstances a day before the election. The ruling coalition reportedly hired international political consulting firm Cambridge Analytica (which has been credited with President Donald Trump's electoral victory) and invested heavily in a Central Command System. The opposition is running a parallel tallying system on a server hosted in Tanzania and Germany. And, perhaps the highest cost was human life: IEBC ICT Director Chris Msando was kidnapped, tortured and killed five days before the vote.

REPORTER'S NOTEBOOK: Why are Kenya's elections so bitterly contested?

The cumbersome process also leads to some absurd complexity. France, with 33.7 million voters announced presidential results in less than eight hours - Kenyans waited four days. An Emirati company was contracted to print ballot papers for the Kenyan election, but as others have wondered, how is it that Kenya can print its own money but not its own ballot papers? Tiny Gambia can use marbles to vote out a 22-year autocracy but the largest economy in East Africa requires close to $500 million in state costs alone to birth a crisis.

If these few days are an indication, hardly anyone has mastered the breadth of process that governs elections in Kenya today, IEBC officials included. None of this procedural complexity is about the voter. That's why civic education for the August election only began at the end of June, perhaps contributing to over 400,000 rejected votes. It doesn't matter if the voters understand the rules of the process, as long as enough participate to legitimise the outcome of the power struggle at the top.

This complexity breeds anxiety that comes to a head during counting and tallying. Voters are expected to trust completely a state institution in a country where state institutions have little credibility. The ruling party craves an illusion of modernity, insisting that all the money and law expended built a system that works while papering over legitimate and visible concerns.

The opposition has no power over the process and resorts to extreme measures to gain some measure of control - screaming about hacked systems without revealing how they got into the system themselves.

Elections week in Kenya is a flurry of accusations, obscure legislation and new found importance of faraway places that most Kenyans can't find on a map, resulting in general unease even though few voters can articulate why.

The threat of violence looms over Kenyan elections in part because of this unease. People use election violence, like other forms of violence, to feel like they're in control when they're not. Between 1992 and 2002, the state instigated election violence to retain control after the end of single party rule. In 2007, with Moi out of the picture, opposition politicians - some of whom are in government today - used violence to undermine the state's complete control over the election process.

The key difference is that before 2002, the state had a relative monopoly on election violence in Kenya but after 2008, violence outside state control became an issue. This is why so few Kenyans associate 1992 or 1997 elections with violence in the way they do the 2007 elections: the concern isn't violence in general, but violence that isn't controlled by the state.

And that's why the killing of 25 people, including a 6-month-old child, by the police isn't considered election violence.

The are two ways to end the cycle of uncertainty around Kenyan elections. One is to hope for eventual generational change through the ballot, which is happening but at a frighteningly slow pace. The second is for the powers that be to finally build a system for the voter and not for politicians. Give voters a system in which their votes count, and watch the count get better.

Nanjala Nyabola is a Kenyan writer and political analyst based in Nairobi, Kenya.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.