ABIDJAN (Reuters) - Ivory Coast President Alassane Ouattara dismissed the heads of the army, police and gendarmes on Monday after a two-day military mutiny that spread unrest across the West African nation, according to a presidency statement.

Ivory Coast Prime Minister Daniel Kablan Duncan waves after the resignation of his government in the Presidential Palace in Abidjan, Ivory Coast January 9, 2017. REUTERS/Thierry Gouegnon

Prime Minister Daniel Kablan Duncan also resigned and dissolved the government, a move that had been expected after elections last month but which was delayed two days by the weekend uprising.

Disgruntled soldiers demanding the payment of bonuses and wage increases began their revolt on Friday, seizing control of Bouake, the second largest city, before troops in military camps in cities and towns across the country joined the mutiny.

Army chief General Soumaila Bakayoko - the former military head of a 2002-2011 rebellion, who has become increasingly unpopular with many troops - was replaced by his second in command, General Sekou Toure, the presidency statement said.

Gervais Kouakou Kouassi, superior commander of the National Gendarmerie, and Director General of the National Police Bredou M’Bia were also replaced by their deputies with immediate effect, according to the statement, read on national television.

The uprising of mainly former rebels now integrated into the army was the second such army mutiny in less than three years.

As happened in the first uprising, the government conceded to the low-ranking soldiers’ demands and agreed to pay bonuses likely to cost state coffers tens of millions of dollars.

Defence Minister Alain-Richard Donwahi was briefly trapped inside the house in Bouake where negotiations took place on Saturday after some mutineers opened fire outside, having initially rejected the timetable for bonus payments.

“I assure you that the president of the republic understands you. He is a man of his word,” Donwahi said on Monday in a televised address aimed at the disgruntled soldiers.

He said he planned to return to Bouake on Friday to meet again with the mutinous troops.

UNSTABLE MILITARY PUTS ECONOMIC RECOVERY AT RISK

Years of conflict and a failure to reform the army, cobbled together from rival rebel groups and government soldiers, have left it hobbled by divisions.

Ivory Coast, French-speaking West Africa’s largest economy and world’s biggest cocoa producer, emerged from a 2002-2011 political crisis as one of the continent’s rising economic stars. But Ouattara’s failure to rein in an ill-disciplined, factionalised army could threaten that recovery.

Duncan, the outgoing premier, had been expected to stand down on Saturday but held off after the army mutiny erupted.

“I have tendered my resignation and that of the government,” he said after a meeting with Ouattara.

The president retained his majority in the Dec. 18 parliamentary vote. However, Ivorian legislative elections are usually followed by a change of government as a matter of procedure.

Ouattara was expected to name a new prime minister in the coming days.

Slideshow ( 3 images )

Earlier, Guillaume Soro was re-elected as president of the National Assembly with 95 percent of the votes cast by deputies.

Soro led a rebellion that controlled the northern half of the country for nearly a decade starting in 2002. He later served as prime minister between 2007 and 2012.

The government’s dissolution paves the way for the implementation of measures contained in a new constitution.

Ouattara signed the new charter, which had been approved by referendum, into law in November, casting it as the way to ensure peace is maintained in Ivory Coast.

It modifies clauses in the old constitution that lay behind the conflict, especially concerning nationality requirements for presidential candidates.