Renegade troops in Ivory Coast have accepted a government proposal on bonuses and returned to their barracks, ending a mutiny that had closed businesses, shut major roads and threatened years of economic progress in the world's top cocoa producer.
The dissident soldiers, mostly former rebels who helped bring President Alassane Ouattara to power, rejected an earlier offer late on Monday.
However a spokesman for the mutineers said the deal was amended overnight.
"We accept the government's proposal ... We are returning to barracks now," the spokesman said, speaking in the city of Bouake where the revolt began last Friday before quickly spreading.
Some of the 8,400 mutineers had already received the bonuses agreed under the new deal by midday, he said.
The short-lived uprising exposed Mr Ouattara's tenuous grip on an army patched together from former rebel and loyalist fighter sin the wake of a 2011 civil war, since when Ivory Coast has transformed itself into one of the world's fastest-growing economies.
As the troops dismantled road blocks and left the streets, Defence Minister Alain-Richard Donwahi, who confirmed a definitive deal to satisfy the mutineers' demands had been reached, urged calm.
He said at least two people had been killed in the unrest and another nine wounded.
"There are certainly people who are guilty. Investigations have been requested so that disciplinary measures can be taken against anyone guilty of a criminal act," he told reporters.
Mr Donwahi said an investigation was also being launched into a secret weapons cache discovered at a private residence in Bouake.
"Most of the weapons were carried away by the soldiers. Not by the civilian population," he said.
Cocoa exporters at Abidjan port resumed buying beans from the country's interior after a one-day closure, and banks re-opened.
The western port of San Pedro remained closed, but exporters there said work would recommence tomorrow.