Mutinous soldiers released Ivory Coast's Defence Minister Alain Richard Donwahi late on Saturday after detaining him for two hours in a tense standoff over pay.
The country has been rocked by two days of unrest after soldiers seized control of the second largest city Bouake early on Friday in a mutiny that spread to other cities including the economic capital Abidjan.
The soldiers are seeking bonuses, pay rises, housing, and faster promotion. Donwani and his aides flew into Bouake earlier on Saturday in a bid to defuse the crisis.
Following talks between Donwahi and mutineers, President Alassane Ouattara announced that he had agreed to address some of the soldiers' grievances.
But some angry troops rejected the terms of the agreement, firing Kalashnikov rifles and heavy weapons outside local government offices, where they were meeting to block Donwahi and his team from leaving.
It is not known whether the soldiers will honour the agreement. Neither Donwahi nor the mutineers made any comment as the minister was released. The barricades that had blocked entry to Bouake since Friday were lifted, and the automatic rifle fire that had rattled all through the previous night and into Saturday fell silent.
A similar uprising occurred in 2014 when hundreds of soldiers barricaded roads in several cities and towns across the country demanding back pay. The government agreed to a financial settlement with the soldiers, who returned to their barracks.
Bouake was the stronghold of the rebel-controlled north throughout the country's 2002-2007 civil war. Many of those fighters have been integrated into Ivory Coast's army.
The soldiers, however, say not all the promises made in the 2007 agreement which ended the conflict were implemented.