Burkina Faso coup leaders agreed to return to their barracks and said they would restore the deposed president to power, signing a deal with the army that apparently defuses a tense standoff sparked by last week's putsch.

The breakthrough came yesterday after marathon talks in Nigeria's Abuja, where west African heads of state had sought to break the impasse fuelled by angry threats on both sides.

The deal was signed a day after troops entered Burkina's capital Ouagadougou, turning up the pressure on the elite presidential guards (RSP) who staged the coup.

Under its terms, the RSP agreed to stand down from the positions they had taken up in Ouagadougou, while the army also agreed to withdraw its troops and guarantee the safety of the RSP members as well as their families.

The deal was presented to the Mogho Naba, "king" of Burkina Faso's leading Mossi tribe, in front of the media early Wednesday.

Burkina Faso plunged into crisis last Wednesday when the powerful RSP detained the interim leaders who had been running the country since a popular uprising deposed iron-fisted president Blaise Compaore last October.

The elite unit of 1,300 men loyal to Compaore officially declared a coup Thursday and installed rebel leader General Gilbert Diendere, Compaore's former chief of staff, as the country's new leader.

The breakthrough came as Diendere told AFP that interim president Michel Kafando, who had been seized by presidential guards but later released, would be returned to office on today.