It's not easy to get a sitting president to leave office. In some cases, corruption, violence, and institutional inertia have conspired to keep some African presidents in office for decades.
In other cases, the sheer weight of going up against a person who knows the system, has the theoretically unlimited resources of the state at their disposal, and to whom political appointees owe their allegiance is often too much for opposition parties.
So, elections are held, but there is rarely a surprise. Hence why today's annulment of the election victory of President Uhuru Kenyatta by Kenya's supreme court is such a landmark moment.
Change certainly can happen at the end of a constitutional term in office. But the power of incumbency means that it is rare for a sitting president to be turfed out if he or she is not ready to retire.
But in the last three years some significant shifts seem to be occurring. A quick survey of the status of incumbency across the continent suggests a growing political maturity - not in African voters, who have always turned out in big numbers to make their voices heard - but in African politicians who are increasingly willing to accept defeat.
In a world where generalisations and trends about Africa tend to be negative, this resurgence of democratic spirit is an important one to note.
It began in Nigeria in 2015 when Muhammadu Buhari beat then-president Goodluck Jonathan in a hotly contested poll. Given Nigeria's chequered political history there was real apprehension over whether Jonathan would concede. But he not only conceded, but congratulated Buhari for his win.
Then John Dramini Mahama became Ghana's first one-term president. He happily handed over to Nana Akufo-Addo in 2017, that man he defeated in the 2012 vote.
A slightly different set of circumstances led to an unexpected transition in the Gambia. Self-proclaimed ruler-for-life Yahya Jammeh surprisingly accepted electoral defeat after 22 years in office.
Granted Jammeh did try and walk back his concession after the opposition threatened to prosecute him for crimes committed in office, but in the end he fled into exile in Equatorial Guinea.
And then in Somalia, Mohamed Farmaajo took over from Hassan Sheikh Mahmood in February this year in a peaceful transition that defied the logic of the country's ongoing civil war.
Of course, it's not all been smooth sailing. In Burundi, Pierre Nkurunziza's tampering with the constitution to stay in office has thrown that country into chaos. In Gabon, Omar Ali Bongo needed one of those last-minute 99 percent turnouts in his home constituencies in order to secure his stay in power.
Elections in Chad and in Guinea led to violent boycotts that did nothing to shift the status quo, while in Angola, although Jose dos Santos is nominally stepping aside, his hand-picked successor is about to slip into his shoes.
And while the victories of perennial presidents Yoweri Museveni (Uganda) and Paul Kagame (Rwanda) were never in doubt, there was still a measure of disappointment that neither made any serious effort to at least sustain the illusion of democracy.
In Uganda, perpetual oppositionist Kizza Bessigye has been repeatedly detained and harassed, while Diane Rwigara, one of Kagame's challengers, has lately gone missing.
That's what makes the news from Kenya so astonishing, and the court's judges such unlikely heroes.
The commission that runs the elections had declared incumbent Kenyatta the winner of the 8 August election - despite loud protest by the opposition party, NASA. The opposition insisted that though the vote had been free and fair, the tallying of the results had been fiddled with.
So certain was NASA that it would not get a fair court hearing that it initially refused to lodge a petition and present its evidence of electoral fraud.
The decision by the supreme court, by a 4-2 majority, that there were enough irregularities in the conduct of the ballot to invalidate was therefore stunning. The verdict takes Kenyans back to the polls within the next 60 days.
But just as importantly it has also been a dramatic assertion of the judiciary's independence.
For the long game of establishing democracy and the rule of law in Kenya, the supreme court's decision was a good one. It restored confidence in a body that Kenyans routinely place second or third on their list of the least trustworthy institutions.
Ultimately, it brought the judiciary back into play as a place where executive power can be checked, further watering down the near-absolute hold that incumbents have over political processes on the continent.
Anywhere in the world, incumbency is a powerful force for any opposition to counter. One side has access and power to state resources but also has the privilege of inertia from voters and a human instinct to favour stability over disruption.
Leaders rarely remain in office purely based on the choice of voters. The power of incumbency rests on the availability of three things: a political leader who wants to retain power; an electoral commission that is easy to influence or compromise; and a judiciary that is willing to look the other way.
To date, electoral commissions have been the focus of efforts to check the power of incumbents, and while this proved enough in Ghana, Nigeria, and Gambia, in many cases it's simply not enough.
Today's decision in Kenya adds another player to the game, which one can only hope inspires more judiciaries on the continent.
Nanjala Nyabola is a Nairobi-based writer and political analyst.