Bissau - Guinea-Bissau's junta and opposition parties on Wednesday formally dissolved the government and called for a two-year transition period before new elections can be held.
The deal, presented to journalists, defied a chorus of calls from the international community, which has demanded the immediate restoration of the government ousted in a 12 April army coup that aborted an ongoing electoral process.
"The national assembly is dissolved, the president and government are relieved of their duties," said a source close to talks between the junta and opposition leaders, who spoke on condition of anonymity.
"The hierarchical structure of the army is maintained," the source added.
The deal also confirmed the creation of a National Transition Council, which will name an interim president and government.
Opposition parties have denounced the coup but some observers have condemned them for negotiating with the putschists who had promised a return to civilian rule, but ruled out the inclusion of leading presidential candidate Carlos Gomes.
Gomes' African Party for the Independence of Guinea and Cape Verde (PAIGC) has categorically rejected all proposals made by the junta.
Luis Olivares, PAIGC secretary general, demanded that "all dissolved institutions be re-established" and that a planned second round election on April 29 go ahead.
"For the PAIGC, the return to constitutional normality means that the interim president and prime minister return to their posts," he told AFP.
"The National Transition Council is anti-democratic and anti-constitutional."
He also called for the United Nations to send a "stabilisation force" to the country, whose army and state have been in constant competition since independence from Portugal in 1974, leading to coups, counter-coups and assassinations.
The most recent coup came in the middle of an election billed as a test of the country's commitment to stability and seen as key to dealing with a booming cocaine trade to Europe in the impoverished dysfunctional nation.
Gomes stepped down as prime minister to take part in the polls after the death in January of president Malam Bacai Sanha, and won a first round which opposition candidates denounced as fraudulent and declared a boycott.
However with a little more than two weeks until the elections, soldiers seized power over the presence of Angolan troops in the country, saying there had been a "secret deal" with Angola to undermine the army.
Constant tension between army and government saw the president and army chief assassinated in 2009 and in 2010 Gomes was held hostage during an army mutiny.
The former prime minister is being held by the junta along with interim president Raimundo Pereira and several former ministers.
Junta spokesman Daba Na Walna told journalists for AFP and Radio France Internationale that Gomes and Pereira would only be freed "when security conditions are right".
It is still not clear how many people are being held, and while a team from the Red Cross was able to take medicine to Gomes, a diabetic, on Saturday, no one has seen Pereira since the coup.
"We haven't seen him, but we would like to see him," said a Red Cross spokesperson in Dakar, Denes Benzedi, adding they were in dialogue with the junta to get further access to the prisoners.
The capital Bissau remained quiet as many left for the interior after the coup fearing further violence. Banks were closed and petrol and money was running low.
Peter Thompson, the head of the election observer mission from Britain, was stranded in the country whose borders have been closed since the coup.
"Clearly it is a great shame for both the people of Guinea-Bissau and the international community that the democratic process has been undermined so forcefully," said Thompson, who also leads a parliamentary group on Guinea-Bissau.
Fifty percent of cocaine trafficked into Britain comes from west Africa and London had been heavily involved with rustling up investment and working on stability issues in Guinea-Bissau in recent months to stem the drug flow.
On Tuesday AU Peace and Security Council chief Ramtane Lamamra urged the AU commission - the bloc's executive body - to consider imposing sanctions on the coup leaders.