In a 4-2 decision on Friday, Kenya’s Supreme Court annulled the results of the country’s August 8 presidential election, requiring a new one to be held within the next 2 months. The opposition candidate, Raila Odinga, accused the country’s electoral commission of widespread vote manipulation after the incumbent, Uhuru Kenyatta, won a second term with with 54% of the vote. Odinga had previously challenged the results of the 2013 and 2007 elections, claiming electoral fraud, but this is the first time that a court has annulled the results of an election upon the initiative of the opposition in Kenya—and in Africa as a whole.

Although Kenya has had democratic transfers of power in the past, its democracy is far from perfect. Thus a fraudulent electoral commission is well within the realm of possibility, as is a politically biased court ruling. So is the Supreme Court staffed with politicized “crooks,” as claimed by Kenyatta, or has the electoral commission “committed criminal acts,” as claimed by Odinga? The evidence indicates that the electoral commission was, in fact, at fault, and that the court ruling is a positive development for Kenya and African democracy in general by targeting the less obvious threats to democracy.

Kenya, located in East Africa, is a densely populated country with around 49 million inhabitants. With a robust service sector, high level of industrialization relative to its neighbors, and a healthy tourism industry as a result of its natural beauty, Kenya is the economic hub of East Africa. The country was a British colony until 1963, after which it was led by Jomo Kenyatta, Uhuru Kenyatta’s father. Since then, Kenya has progressed similarly to a number of African countries. It has developed functional democratic institutions, but, to quote Freedom House, these are “seriously undermined by pervasive corruption and cronyism, police brutality, and ethnic rivalries that are exploited by political leaders.”

In both Kenya and elsewhere, elections became a fusion of democracy and corruption. Voters get to cast their ballots, but elections are often marred by irregularities. In Rwanda, for example, the incumbent gained a ridiculous 98.79% of the vote. Last year in Gabon, vote rigging was more subtle, with only one region reporting unrealistic results. Also in Gabon, and in many countries like it, the judiciary was stacked with judges loyal to the incumbent, meaning it turned a blind eye to the irregularities. Although Kenya has a stronger democracy than Rwanda and Gabon, it and countries like it have been plagued with similar issues in the past. Most of these issues, however, are not overt autocratic institutions. Rather, they are subtle attacks on democratic institutions that tilt the playing field in favor of the incumbent.

According to Al Jazeera, “the IEBC [Independent Electoral and Boundaries Commission] conceded that they did not use the electronic transmission system they were required to, and instead relied on text messages and photographs of manually filled forms as sources of information.” In fact, the man responsible for the electronic transmission system was murdered in July. Questions were also raised when “a number of the forms provided by the IEBC also didn’t have serial numbers or bar codes, and some were simple lined paper with numbers scrawled on them.” Thus the election was clearly marred by irregularities.

What was not clear, however, was any evidence showing that the irregularities were part of a coordinated effort to aid Kenyatta or had an effect on the outcome of the election. Thus the election was not an overt case of vote-rigging. That is why the court ruling was so important. It shows that intent and politics became irrelevant; the existence of irregularities in and of itself was seen as a justification for nullification. Regardless of whether the irregularities were malicious or had an effect on the election’s outcome, the fact remains the election was deeply flawed due to institutional weakness. That this fact alone was enough to annul the election is of immense consequence.

It is of consequence for two reasons: it is a sign of judicial independence and acknowledges that not all threats to democracy are overt. First, the fact that the Supreme Court annulled the victory of an incumbent is an important sign of the separation of powers between the executive branch and the judicial branch. This means that the judicial branch can act independently as an effective check on the power of the legislature and the executive. Yesterday, Kenyatta declared that the Supreme Court was a “problem” that he hoped to “fix.” While such rhetoric is dangerous because it threatens to erode the independence of the court, the fact that the court isn’t already “fixed” is a positive reflection on the health of Kenya’s democracy.

Furthermore, this ruling recognizes that less conspicuous tactics to erode the effectiveness of democratic institutions can be just as dangerous as a faked election. It shows that the electoral commission is expected to hold elections that are not just free and fair, but also well-run and of a high quality. The ultimate effect of this is that indirect attempts to sway the results of the election will become more difficult. When only direct threats to democracy are targeted, less obvious threats are allowed to remain. By remaining independent and tackling any and all irregularities, Kenya’s Supreme Court is targeting these less obvious threats. That is a victory for Kenyan democracy.