Jubilee Party supporters cheer Nov. 20 in Nairobi after Kenya’s Supreme Court upheld the reelection of President Uhuru Kenyatta in last month’s repeat presidential vote. (Baz Ratner/TPX Images of the Day/Reuters)

On Nov. 20, Kenya’s Supreme Court upheld Uhuru Kenyatta’s win in the repeat presidential election conducted Oct. 26, which opposition leader Raila Odinga boycotted. Kenya’s Supreme Court featured prominently in the 2017 elections, most notably by nullifying the earlier Aug. 8 election — a move that led to demonstrations, commercial boycotts and political unrest in coastal and western Kenya.

Kenya’s 2007 presidential election saw a similar dispute: The chairman of the election commission declared incumbent Mwai Kibaki the winner, and the chief justice of Kenya’s Supreme Court hastily swore the president into office in the dark of night.

Citing massive electoral fraud, Raila Odinga — also the main opposition candidate in 2007 — stated that he would not contest the rigged election in court but instead called his supporters to mass action. In the weeks that followed, more than 1,000 Kenyans died in the most violent post-election period in the country’s history.

Not all disputed elections lead to violence

Across Africa, disputed presidential elections degenerated into post-election violence in Ethiopia (2005), Nigeria (2007), Zimbabwe (2008), Ivory Coast (2010) and more recently in Gabon (2016), among others.

But not all disputed elections lead to violence. Opposition politicians disputed the outcomes of presidential elections in Zambia and Uganda in 2016; Angola in 2017; and Ghana in 2012, but none of these countries experienced significant violence after the elections. Instead, the losers filed election petitions in court to challenge the outcome.

In some cases, candidates disputed elections using the courts but also encouraged mass actions that could lead to violence. For example, when Muhammadu Buhari lost to Umaru Yar’Adua in Nigeria’s 2007 election, Buhari called his supporters to the streets and also filed an election petition in court.

In 2016, Jean Ping, the opposition presidential candidate in Gabon, lost to incumbent President Ali Bongo Ondimba. Ping disputed the election outcome and filed an election petition, declared himself the winner and called for mass action.

What explains how opposition candidates respond to disputed presidential election outcomes?

In my research on when judiciaries can reduce violence, I’ve studied the ways opposition candidates respond to African elections outcomes since 1990. Here’s what I found: When the judiciary is quasi-independent, opposition candidates tend to engage in post-election violence.

When judiciaries are strong and independent, the opposition has no incentive to use violence because it expects the judiciary will be impartial. Candidates turn to the courts to dispute election outcomes.

If the judiciary is weak and dependent on the appointing powers of the incumbent president, the opposition will also refrain from using violence because there is no expectation that the judiciary will ever rule against a sitting president. In other words, the payoffs for engaging in post-election violence under weak judiciaries are minimal because the violence will not influence the court’s ruling since the court is beholden to the incumbent president.

However, in countries like Kenya before 2010, Zimbabwe, Nigeria, Ivory Coast and Ethiopia, which have quasi-independent judiciaries — opposition candidates use post-election violence to create political uncertainty to influence the judiciary to be impartial.

How did this play out over hundreds of elections in Africa?

My research combines existing data from scholars’ earlier works on elections, violence and the judiciary. Data on the 390 elections conducted between 1990 and 2012 in African countries characterized as competitive for electoral democracies come from Susan Hyde and Nikolay Marinov’s work on competitive elections. Data on election violence during those elections come from the Social Conflict Analysis Database by Idean Salehyan, Cullen Hendrix and others. Finally, the data on judicial independence come from Drew Linzer and Jeffrey Staton’s judicial independence around the globe project.

Of these 390 elections, I found that 132 elections experienced significant pre-election violence and 91 saw major post-election violence. These categories refer both to spontaneous and organized election violent episodes by the state or the opposition candidates — where the source of tension is elections.

Countries with high judicial independence like Botswana, Namibia, South Africa and Ghana experienced low levels of post-election violence. When Nana Akufo-Addo narrowly lost to then-incumbent president John Dramani Mahama during Ghana’s 2012 elections, Akufo-Addo filed a petition at the Ghana Supreme Court, alleging widespread electoral fraud and collusion between the electoral commission and the incumbent party. Even after losing in court, Akufo-Addo accepted the court’s decision and urged his supporters to do the same.

When countries with high judicial independence saw election violence, it typically took place during the founding or second elections following the reintroduction of multiparty politics, often before judiciaries became professionalized. For example, Sierra Leone’s founding elections in 1996 and in 2002 were characterized by some post-election violence, but these elections occurred during or just after the country’s civil war (1991-2001). Later elections in Sierra Leone in 2007 and 2012 were nonviolent.

There were also countries with low judicial independence that experienced little post-election violence, like Gambia, Guinea, Togo and Gabon. These were countries in which incumbent presidents held significant control over the judiciary, however.

When Gambia’s incumbent President Yahya Jammeh petitioned the Supreme Court to challenge opposition candidate Adama Barrow’s 2016 win, the case could not be heard because there were not enough judges on the bench — Jammeh had refused to appoint new justices for the Supreme Court.

African countries that account for most of the post-election violence since 1990 had quasi-independent judiciaries. Take, for example, the Kenyan case: Multiparty elections in 1992, 1997 and 2002 were conducted under a weak judiciary.

The second amendment to the Kenyan constitution gives the president the sole power to make judicial appointments. Under this amendment, the president also can investigate a judge’s conduct for the purpose of termination without consulting the judicial service commission. There was piecemeal judicial revamping under Mwai Kibaki in the early 2000s, but the Kenyan judiciary remained quasi-independent until 2010.

The new Kenyan constitution in 2010 empowered the judiciary with clear term limits, and divested the appointment and termination procedures from the president. The 2013 and 2017 Kenyan elections were conducted under an independent judiciary, leading to less post-election violence. As an indicator of faith in the new independent judiciary, election petitions increased from single digits before 2013 to 187 after the 2013 elections and 288 after the 2017 elections.

Courts across the world can mediate disputed elections, but losers will not rely on courts in countries when the judiciary is not independent. Unless judges enjoy security of office with removal procedures divested from the executive or legislature, we should expect to see competitive elections potentially leading to violence.

Meshack Simati is a Jennings Randolph Peace Scholar and PhD candidate in political science at Georgia State University. His research centers on political institutions, democratization and election violence in Africa.