It’s rare for African politics to feature in the Australian media for anything other than bad news, exemplified in the continuing disaster of Zimbabwe. So it’s worth taking a closer look at a rare good news story: the west African state of Ghana, which concluded its presidential election yesterday.

Ghana, formerly a British possession known as the Gold Coast, became in 1957 the first of the black African colonies to win its independence. As such, it was the first to go through a cycle that became familiar: an elected radical left-wing government that declared a one-party state, followed by a military coup with promises of a return to democracy that were imperfectly kept, then further coups, ethnic clashes, instability and economic chaos.

The turning point in Ghana came with a coup in 1979 led, unusually, by an air force officer, flight-lieutenant Jerry Rawlings. After another failed attempt to reintroduce civilian rule, Rawlings decided to do the job properly, and spent most of the 1980s comprehensively restructuring the country’s political and economic institutions.

Remarkably enough, it seems to have worked. Rawlings was elected to two four-year terms as president, from 1992 to 2000, and not only did he then retire peacefully, but the opposition’s John Kufuor won the ensuing election: a democratic transition that’s all too rare in Africa. Kufuor was re-elected in 2004, but his successor (to be sworn in on Wednesday) will be his political opponent John Atta Mills, who defeated the ruling party’s candidate, Nana Akufo-Addo, in a runoff election.

Ghana’s elections have repeatedly been certified by international observers as free and fair. Although this election was extremely close — Mills won 50.2% of the vote, a margin of just over 40,000 votes — and a court challenge has been foreshadowed, it looks as if power will again transfer peacefully from one party to the other. The country has also enjoyed strong economic growth and a good record for civil liberties.

So what lessons can be learned from Ghana? Most obviously, it refutes the claim that black Africans are simply unfit for democratic government, a claim rarely heard in public but which nonetheless underlies much of the comment on Zimbabwe.

It also suggests that a good cleanout of the ruling elite has its benefits: Rawlings was a ruthless leader, having three former heads of state executed in his first weeks in power.

But most of Ghana’s advantages have parallels in other states with much less happy results. It had a stable and prosperous pre-colonial history, but so did, for example, Uganda. Its linguistic and religious divisions are relatively mild, but still more pronounced than, say, Somalia. And, needless to say, the military strongman with a project of restructuring has been tried in many other places, often leading to disaster.

Enlightened despotism can work, provided your despot is genuinely enlightened. Most, however, are not, and no one has ever come up with a way of determining this vital point in advance. Ghana seems to have got lucky with Rawlings; it can only be hoped that other countries will learn to imitate the result, if not the method.