(CNN) -- Guinea-Bissau's military announced Wednesday that it would hand over power within days to a civilian transitional government that would rule for up to two years.
Two dozen political parties have signed an agreement to set up a National Transition Council, said Lt. Col. Daba Naualna, a military spokesman. That council would run Guinea-Bissau for a two-year period, at the end of which a new president and parliament would be elected, Naualna said.
The country's judiciary and military will remain in place during the plan, and the military says it will submit to civilian power once those institutions are set up.
Military commanders seized power from interim President Raimundo Pereira and former Prime Minister Carlos Gomes Jr. last Thursday, keeping them in custody for what it said were "security reasons."
The coup took place just before the second round of presidential elections scheduled for April 29, sparking international condemnation and calls for a return to civilian rule by the African Union, Western powers and the regional Economic Community of West African States.
There was no immediate response to Wednesday's announcement. The African Union has suspended Guinea-Bissau "until the restoration of constitutional order," while ECOWAS has said it has "zero tolerance for power obtained by unconstitutional means."
Naualna said Pereira and Gomes would be released "when we have a government and subsequently a Ministry of Interior which could provided security to all citizens."
The military command has said the revolt was in response to a "secret deal" between the government and Angola to allow Angolan troops in the country to attack the military. Angola said it has a number of troops in Guinea-Bissau to help reform the country's armed forces, but said it would unilaterally withdraw them.The junta insisted that the African Union, whose rotating presidency is currently held by Angola, supports intervention by Angolan forces.
Coups and coup attempts are common in Guinea-Bissau since it won independence from Portugal in 1974. To date, no democratically elected president of the country has served a full five-year term.
Pereira became interim president after the January death of incumbent Malam Bacai Sanha after a long illness. Sanha had become president in September 2009 after the assassination of his predecessor.
CNN's Umaro Djau contributed to this report.