When I first said that I was going to write a book about the history of democracy in Africa, quite a few people responded with a joke. That will be one of the world's shortest books, up there with the compendium of great English cooking, they would say.
But, it turned out that there was a lot to talk about: Africa's past reveals more fragments of democracy than you would think. And, its present has a number of important things to teach the world about the conditions under which democracy can be built.
The poor quality of elections in many sub-Saharan African countries, combined with a tendency for the media to focus on controversy, means that Africa is often depicted as a bastion of authoritarianism. But, it actually has some of the most remarkable and important stories of democratic struggle.
Countries such as Benin, Botswana, Ghana, Namibia, Mauritius, Senegal and South Africa have not only become beacons of political rights and civil liberties, they have done so against the greatest of obstacles. These experiences teach us important lessons about where democracy can work, and why.
Pre-conditions for strong democracy
Political scientists like to talk about the conditions necessary for countries to build a strong and stable democracy. These lists are fiercely fought over, but there are a number of factors that most researchers would agree are probably important.
A cohesive national identity is likely to make it easier to maintain national unity, while wealth and economic success have been found to promote political stability. A strong national infrastructure, underpinned by respect for the rule of law, means that the government is likely to be effective without being abusive. And, a vibrant middle class and powerful civil society are usually seen as important to promote accountability and responsive government.
What is remarkable about the democratisation of African states is that most did not enjoy a single one of these "pre-conditions".
With the exception of South Africa, all of Africa's democracies entered multiparty politics with low GDP per capita and high levels of unemployment. This was compounded by weak and underdeveloped states that had been designed - both in the colonial era and during the authoritarian rule of the 1980s - to exploit resources rather than empower citizens. In states like Ghana, this was compounded by a history of military rule, which heightened the risk of further coups.
Almost all of these states also featured civil societies that were fragile and fragmented, despite the strength of religious organisations. At the same time, in the early 1990s, the middle class was small. More often than not, it was also economically dependent on the government. It was thus poorly placed to fight against corruption or democratic backsliding.
These were not the only challenges that African states faced. With the exception of Botswana, they are all diverse multi-ethnic societies in which the question of national identity has been problematic. In Ghana and Mauritius for instance, ethnic identities have historically played a role in structuring political networks. This increased the tension around elections.
Against this backdrop, all of these states might have been expected to collapse into some form of authoritarian regime by now. Given this context, their success should be celebrated and studied for what it tells us about how democracy can be built even in the most challenging of contexts.
Bucking the trend
While Europe is convulsed by Brexit and the rise of right-wing populists, and Donald Trump is doing his best to undermine America's reputation for political checks and balances, Africa's most democratic states have proved to be remarkably resilient.
Ghana has experienced numerous transfers of power and, in 2016, the first ever defeat of a sitting president. Namibia has consolidated its position as a "free" political system with robust respect for civil liberties, according to Freedom House.
South Africa suffered politically and economically during the presidency of Jacob Zuma, but now has the chance to bounce back after the governing African National Congress (ANC) voted to pursue reform under President Cyril Ramaphosa.
For their part, Botswana and Mauritius - the continent's oldest democracies - continue to combine respect for political rights with prudent economic policies.
Praising Africa's democratic success stories does not, of course, mean that we should overlook its failures. A number of countries have taken steps backwards in recent years, including Tanzania and Uganda. Authoritarian leaders also remain entrenched in Cameroon, Chad, Eritrea , and many more. But it is important to recognise that there is much more to Africa than authoritarianism.
In the absence of the conventional building blocks of democracy, we need to look elsewhere to explain these success stories. Some might be tempted to think that the role of the global community has been critical in keeping governments on the straight and narrow. But in reality, democracy is built from within, as the fact that aid-dependent countries such as Uganda and Rwanda have remained firmly authoritarian shows only too well.
We should, therefore, give greater credit to the politicians and people of Africa's democratic states. African presidents are often lambasted for being corrupt and self-serving. But, in a number of countries, they have shown considerable restraint, establishing institutions capable of checking their power.
In Ghana, cohesive relationships among the political elite have underpinned a growing consensus on the value of democracy. In South Africa, inclusive leadership played a critical role in overcoming racial divisions and building trust in the new post-apartheid political system since 1994. In Namibia, successive presidents have refused to use the electoral dominance of the governing party to remove the opposition.
The role played by African citizens also deserves greater recognition. It was their willingness to take to the streets that forced democratic openings in the late 1980s. The same has been true in recent years, with mass action challenging authoritarian regimes in Burkina Faso and Sudan.
Despite economic challenges and democratic difficulties, high levels of public support for democracy in Africa mean that leaders understand the costs of backsliding.
At a time when people are questioning the value of democracy in many Western states, many African populations who have lived under one-party, one-man, or military rule are prepared to fight to prevent their return. This should serve both as an important lesson and a source of inspiration.