The trial of Ivory Coast’s former president Laurent Gbagbo and the ex-militia leader Charles Blé Goudé, which opened at the international criminal court (ICC) last month, made me reflect on the broader lessons for the west African country – and elsewhere. Does the ICC end conflict or help to exacerbate it?

A decade ago, I was a UN sanctions inspector in Ivory Coast, a role I had previously performed in Liberia. I was an eyewitness to the devastation that Charles Taylor, the former Liberian president who is serving a 50-year jail sentence for war crimes, caused to Liberia and its neighbours. Taylor’s indictment by the Sierra Leone special court in 2003 was a historic moment, and I thought Ivorian politicians would avoid Liberia’s mistakes.

Now in the dock, Blé Goudé and Gbagbo face four counts of crimes against humanity, stemming from violence surrounding the 2010 presidential election. Both men deny the murder, rape, attempted murder and persecution charges against them.

Facebook Twitter Pinterest Men in Abidjan watch a live broadcast of the trial of Laurent Gbagbo at the international criminal court. Photograph: Sia Kambou/AFP/Getty Images

The ICC is currently pursuing cases in nine countries, eight of them in Africa. Critics claim the court is a tool of western neo-imperialism, and accuse it of double standards, citing the refusal of the US, Russia and China to join it.

At a summit last month, members of the African Union backed a Kenyan proposal to push for withdrawal from the ICC.

Clearly the court needs to broaden its focus beyond Africa, but it is better to have a flawed ICC than no ICC at all. The ICC can play an important post-conflict calming role, but it has its limits.

Kenya, where violence flared after the 2007 elections, had a relatively peaceful election in 2013, when the ICC acted as a deterrent for further abuses. This came despite the collapse of an ICC case against President Uhuru Kenyatta.

In some cases, the ICC can prolong conflict as indicted individuals see no incentive to compromise. The timing of indictments is a political choice: the indictment of Taylor in 2003 undermined Liberian peace talks.

International prosecutors can be doctrinaire when being politically agile would enhance their credibility and success.

Boom town: Abidjan flourishing as Ivory Coast heads to polls – in pictures Read more

The Ivory Coast case could provide valuable lessons for the ICC. The scars of the past conflict are slowly healing and the current head of state, Alassane Ouattara, was re-elected with nearly 84% of the vote in October’s presidential election. The main opposition candidate, Pascal Affi N’Guessan, came a distant second in an election that was widely regarded as free and fair.

Investors are returning, the economy is growing and gradually political stability is spreading across the country, defying some fears that “victor’s justice” could jeopardise peace.

But there are still risks. They relate to public perceptions of just how fair the drive for international justice is, and how effective local procedures can be.

Perceptions matter. Not confronting them can nourish longer-term grievances that could re-emerge as violence. An official peace-building effort through a truth and reconciliation commission failed because, despite Ouattara’s promise to hold his supporters to account for human rights abuses in 2010-11, not one of his allies was tried at the time.

But as Ouattara became more confident, a carefully controlled reconciliation strategy gradually developed. Some hardliners within Gbagbo’s Ivorian Popular Front (FPI) party received heavy sentences. But moderate FPI supporters received short or suspended sentences and gradually more have been allowed back from exile or released from jail. N’Guessan, for example, got a two-year suspended sentence, covered by time served.

In March 2014, the government allowed Blé Goudé to be transferred to The Hague to be tried by the ICC, showing the FPI the power of incumbency. But Ouattara has refused to transfer Simone Gbagbo, the former president’s wife, to the court, saying the Ivorian judicial system is competent to judge her.

Ouattara fears that by transferring her he could come under additional pressure to deliver some of his own senior supporters to the ICC. The nastiest single crime of the recent violence took place in Duékoué, when Ouattara’s allies massacred hundreds of Gbagbo supporters.

Last year, the Ivorian judiciary launched an investigation into two of Ouattara’s former allies. Charging these men would blunt accusations of partisan justice and signal that transferring more people to the ICC is unlikely.

The ICC is investigating the role of Ouattara’s supporters in the post-election violence, but the work has been slowed by budget constraints and a lack of cooperation from the administration.

It seems that the ICC has, for now, taken account of local politics and not prioritised this investigation.

Post-conflict justice requires local ownership, and Ivory Coast’s à la carte approach to the ICC might enhance stability. A credible investigation of Ouattara’s former allies would prove that the ICC is no longer needed for Ivory Coast and that the country’s judiciary can provide justice for all.