Burkina Faso will return to civilian rule and reinstate an interim government led by President Michel Kafando, Benin's President Thomas Boni Yayi says.
The decision comes after Boni Yayi held talks with coup leader general Gilbert Diendere in the capital Ouagadougou.
"We may hope again," Boni Yayi said at a press conference after a third round of talks with Diendere late on Saturday.
"We are going to relaunch the transition that was under way - a transition led by civilians, with Michel Kafando," he added, saying that more details of the "good news" would be provided on Sunday.
Soldiers from the elite presidential guard (RSP) stormed into a cabinet meeting on Wednesday and abducted President Kafando and Isaac Zida, the prime minister, disrupting a transition period due to end with polls next month.
Diendere, a former spy chief and close ally of Blaise Compaore, the former long-term president, was named head of the military government the next day.
It was not clear if the alleged deal included amnesty for Diendere or if the election schedule could be restored.
At least 10 people have been killed and more than 100 wounded in street clashes with soldiers since the coup.
The coup derailed a yearlong transition process that followed the fall of Compaore during a popular uprising last October.
Elections were supposed to be held on October 11, but Diendere, a former top Compaore aide, has said that date is too soon.
The coup was swiftly condemned by former colonial power France, the United States, the United Nations and the African Union, which suspended Burkina Faso on Friday.
The AU gave coup leaders 96 hours, or until September 22, to restore the transitional government or face travel bans and asset freezes.
The military released a statement on Friday saying that it had released Kafando from military custody but the interim prime minister remained under house arrest. His fate since is not known.
Hundreds of protesters burned tyres and erected barricades in the streets of Ouagadougou on Saturday in a third day of unrest to demand a return to civilian rule.