Laurent Gbagbo, Ivory Coast’s isolated and besieged strongman, was finally seized by opposition forces in the country’s biggest city, Abidjan. His arrest follows weeks of bloodletting and mayhem in the West African country, fueled in large part by Gbago’s stubborn refusal to accept the verdict of elections held last November and by months of incendiary rhetoric from him and others in his camp, inciting violence upon supposed ethnic outsiders like the elections’ internationally-recognized victor, Alassane Outtara, and the U.N. peacekeeping mission in the country.

But the game is up now for Gbagbo. Last week, as pro-Ouattara fighters swept into Abidjan from enclaves in the north, U.N. peacekeepers and French forces launched strikes against Gbagbo’s heavy artillery. Much of the Ivorian army supporting him deserted to Ouattara’s side or simply melted away. Reports suggest French troops were the ones to break through Gbagbo’s last defenses and apprehend the bunkered autocrat, but Paris has vociferously denied that claim. The latest image of Gbagbo is of him looking rather terrified in a room in the Golf Hotel, Ouattara’s Abidjan headquarters, which has been defended by a cordon of U.N. peacekeepers who for months have been under threat of attack from Gbagbo militia.

But while the likelihood of outright civil war may have diminished, the hard work for Ouattara is only beginning. Richard Downie, deputy director of the Africa program at the Center for Strategic and International Studies in Washington, talked to TIME about some of the immediate challenges facing Ouattara. The first has to do with Gbagbo’s own fate:

Ouattara will need to act with restraint. People will be hoping Gbagbo is hauled in front of the International Criminal Court in the Hague — and he’s probably deserving of that — but the conundrum you get at the end of so many conflicts like this is whether you choose justice or peace. Ouattara needs to push for political reconciliation and needs to form a national unity government, and being lenient is probably the best way to achieve that.

The most generous outcome would likely involve a trial of some sort and then a deal for Gbagbo to go into exile. Even then, that’ll hardly dispel the ill-feeling and bad blood that has boiled up in recent weeks. Over a thousand people have been killed, and Gbagbo’s youth gangs aren’t the only ones to blame: pro-Ouattara militia are implicated in the grisly slaughter and mass rape of civilians in the western town of Duekoue.

The bulk of the fighters supporting Ouattara comprise the old ranks of the New Forces, an army mobilized mostly in the country’s north which fought a bloody civil war against Gbagbo in the south that only ended in 2006. Assuming a mantle of national authority, these New Forces have been renamed the “Republican Forces”. But a ragtag cluster of other shadowy militia — one eerily known as “Invisible Commandos” — are involved as well, and both their allegiance to Ouattara as well as the extent of his control over them remain in question.

Moreover, factions loyal to Gbagbo will likely be furious with the new dispensation. Downie fears “we’ll see a lot more violence in the coming days” and suggests Ouattara’s biggest task will be disarming militias on both sides and forging a representative national army. “This is the number one challenge that emerged from the last civil war and the main reason why the peace didn’t hold. The militias and armed groups didn’t demobilize,” he says.

Encouragingly, Ouattara has been making the right noises about investigating atrocities, healing wounds and taking the war-ravaged country forward to better times. But Ouattara will have to try to shrug off the stigma his opponents pinned to him of being a puppet of the international community, particularly France. Beth Dickinson writes in Foreign Policy:

In this former French colony, resentment toward Paris runs high—a sentiment that Gbagbo became a master of channeling as man of the people. In his final days, he decried French influence in the crisis and said that [French] troops were trying to assasinate him. To his supporters, the pictures of French helicopters and tanks surrounding their leader’s compound could transform Gbagbo into a martyr. The fear is that this could give a second wind to the fighters who have quit Gbagbo’s side in recent days. Either way, Ouattara will have to work hard in his initial days to prove that he is not in bed with the Elysee.

Says Downie:

Gbagbo’s whole political message has emphasizied regional differences in the country and asserted a kind of Ivorian nationalism, blaming problems on outsiders and accusing migrants from the north of stealing jobs in the south. If you have a period now where the rhetoric is toned down and political leaders behave with responsibility and bring people together, then wounds may start to heal.

And there are other reasons, says Downie, to be positive. Ouattara entered Ivorian politics after a distinguished career at a number of international financial institutions, including the International Monetary Fund. If he can survive the political storms to come, the country’s economy—once one of the leading lights in Africa—may slowly get pulled out of its long downward spiral. That’s a prospect, as good as any, for future peace.