Rogue soldiers allowed Ivory Coast’s defence minister and dozens of others to leave a house where they had been trapped on Saturday when some mutineers appeared to reject aspects of a deal intended to end a two-day revolt.

It remained unclear, however, whether the disgruntled soldiers – most of them former rebel fighters now integrated into the army – would honour the agreement announced by the president, Alassane Ouattara, just hours earlier.

The mutiny began early on Friday when the soldiers seized Bouaké, Ivory Coast’s second-largest city. Over the next two days, soldiers at military camps in cities and towns across the country, including the commercial capital, Abidjan, joined the mutiny.

Following talks between a government delegation headed by the defence minister, Alain-Richard Donwahi, and representatives of the mutineers, Ouattara announced he had agreed to some of the soldiers’ grievances, but chastised them for sparking the unrest.

“I would like to say that this manner of making demands is not appropriate. It tarnishes the image of our country after all our efforts to revive the economy,” he said in a declaration that was broadcast on state-owned television.

A mutineer close to the negotiations said the soldiers were satisfied with the deal, which would address demands for bonus payments and improve living conditions, and said they were preparing to return to barracks.

But some of the renegade troops later opened fire outside the house in Bouake where the talks had taken place, trapping Donwahi, local officials, journalists and the mutineers’ own negotiators inside. They were only allowed to leave several hours later.

“We are all out. The soldiers stepped aside and allowed us out. The minister took off from the airport,” said a Reuters reporter who had also been trapped inside the house.

A defence ministry statement later denied Donwahi had been held by the soldiers.

“The minister was in no way threatened by his soldiers but rather continued to carry out the talks,” the statement read.

Ivory Coast – French-speaking West Africa’s largest economy and the world’s leading cocoa producer – has emerged from a 2002-2011 political crisis as one of the continent’s rising economic stars.

But years of conflict and a failure to reform its army, thrown together from a patchwork of former rebel fighters and government soldiers, have left it with an unruly force hobbled by internal divisions.

The revolt comes two years after hundreds of soldiers barricaded roads in cities across Ivory Coast demanding back pay in a near identical uprising. Then too the government agreed a deal that included amnesty from punishment and a financial settlement for the mutineers. The repeat of such a solution raises the risk they could be encouraged to do it again.

Soldiers stand behind Ivory Coast’s defence minister Alain-Richard Donwahi (centre) speaking to journalists after negotiations had originally ended. Photograph: Sia Kambou/AFP/Getty Images

Ouattara came to power in 2011 after a post-election crisis that claimed more than 3,000 lives. The crisis was triggered by former president Laurent Gbagbo’s refusal to accept defeat and step down. It capped more than a decade of turmoil that began with the country’s first coup in 1999.

The new president faced enormous challenges in trying to create a unified army. Despite the government’s attempt at a quick resolution, the incident points to lingering problems with Ivory Coast’s recovery, said Cynthia Ohayon, West Africa analyst for the International Crisis Group.

“This is another reminder that the long-standing issues that led to the crisis are still unresolved,” she said. “Some people forget and think that everything is going well in Ivory Coast. I think this should be toned down.”

Ivory Coast is no stranger to mutinies, having experienced about 10 since 1990, according to Maggie Dwyer, an expert on mutinies in West Africa at the University of Edinburgh. Like Ohayon, Dwyer warned that the resolution announced Saturday might not hold.

“If your soldiers are coming to the streets for pay, there are probably deeper tensions within the military structure and those often go unaddressed,” she said.