Following recent elections, violence flared in Kenya, Zimbabwe and Ivory Coast, while coups took place in Mauritania and Guinea. So when Ghana, one of the continent’s more stable countries, last went to the polls in 2008, more than one country’s future was at stake – indeed, the battered reputation of African democracy was on the line. And a new film, An African Election, presents a compelling account of how Ghana emerged, having stared into the abyss of civil war, its fragile democracy not just intact but fortified after its trial by fire.

Director Jarreth Merz, who was born in Switzerland before spending the formative years of his childhood in Ghana, agrees there is a big-picture significance but, in his early filming, it was the voters’ optimism and commitment to democracy that impressed him.

“So many things have gone wrong in Africa – in Kenya and the Ivory Coast – the elections in Ghana were very important for the west to reinvest and see that success is possible,” Merz explains.

“It was a party at the beginning – I knew we were on to something because it was all so genuine. The people thought that something was possible, something that everyone had said was impossible.”

Several vivid sequences capture the chaotic energy of the Ghanaian election, in which the left-wing opposition party, the NDC, and the right-wing incumbent, the NPP, were the major players. At a rally in a public square, the camera follows former president Jerry Rawlings, campaigning on behalf of NDC candidate John Atta Mills, on to a dais, before panning to reveal a crowd numbering hundreds of thousands. It is a moment of rare power and intensity, establishing how much this election matters to Ghanaians.

Then, later, once the polls open, we see voters prepared to queue all day. When the polls close, they stick around, demanding to watch the votes being sorted, hundreds of them counting aloud in unison. Once the ballots are packed up and driven to the electoral commission, the towns explode in spontaneous carnivals of celebration. So far, so good. At this point, Ghanaian democracy comes across as slightly rickety, but more or less functioning and Merz admits he was unsure of whether he had a story worth telling.

“I was like, ‘Where is this going?’ It’s just ‘blah blah blah’ and politicians making the same old promises,” he says.

“But I came to realise that it was more complex than that.

“There was so much at stake – there were investors who were supporting different parties. This is where elections can become dangerous because they can become so polarising.”

And, gradually, cracks begin to appear. Thugs show up at some of the booths, intimidating voters and then, the election is cancelled in a remote constituency because of “irregularities”. The atmosphere becomes increasingly fraught as the votes are counted – there are disputes over the accuracy of the figures but, in the end, neither of the main parties has enough votes to form a government, meaning a second election – a run-off between the NPP and the NDC – is required.

Simultaneously, disputes between the party officials, who are essentially responsible for keeping each other honest, boil over. As one accuses the other of electoral fraud, as both parties claim to have won, the threads that bind them together in civility fray alarmingly. Outside, unrest stirs and, for a period, Ghana’s peaceful elections look set to descend into bloodshed.

“It was extremely tense – the evidence wasn’t there and no one knew what the truth was,” Merz explains. “We thought they would start going at each other and take it to the streets immediately. I just left my cameraman in the counting room and told him to follow his instincts and he did a brilliant job. He came out with a piece of political history of Ghana, something that shows the fragility of democracy but also the strength of it.

“It was wild – I was only scared when the people around me didn’t know what was going on – accusations started to fly back and forth. It goes on radio and then it becomes dangerous because it becomes uncontrollable and all kinds of dynamics start happening. You get the mobs, the uneducated young guys, people start firing shots. Everyone said it would be peaceful but at that point, no one knew anymore. But then, just at that moment when we were in trouble, the mob began chanting, ‘We want peace’.”

Without revealing the final twists and turns, when Ghana ultimately pulls itself back from the brink of civil war, it comes as a relief. That it was able to resist, then reverse, the inertia driving it, seemingly inexorably, toward violence is, for Merz, the takeaway message of the film, the teachable moment that needs to be replicated in other parts of Africa.

“You know, 1600 people died in post-election violence in Kenya,” he says. “So the people there want us to tell this story of Ghana – they don’t want more violence. And there are elections there next year, so that’s what we’ll be doing. Hopefully it will be a successful journey – a political safari.”

Words: Tom Sturrock