Guinea-Bissau's prime minister has been released from house arrest and met Friday with the president at the presidential palace.
Journalists said the capital, Bissau, was back to normal, with businesses open and busy.
Soldiers had seized Prime Minister Carlos Gomes Junior at his office Thursday morning. They also detained Army Chief Zamora Induta. Deputy army chief, Antonio Ndjai, declared himself in charge of the army.
But the soldiers surrounding Mr. Gomes residence were dismissed Thursday afternoon after a visit from President Malam Bacai Sanha. A police guard remained.
In a statement Friday, the U.N. Security Council urged everyone to avoid violence and uphold the constitution.
U.N. Secretary General Ban Ki-moon had said he was following the situation and called on military and political leaders to resolve their differences peacefully.
An ECOWAS official, political director Abdel-Fatau Musah, told VOA that ECOWAS was working closely with Guinea-Bissau on security sector reform and was concerned by Thursday's events.
The situation appears to be related to Bubo Na Tchuto, a former navy chief who was accused of leading a 2008 coup attempt. Soldiers on Thursday retrieved Na Tchuto from a United Nations building where he had stayed since returning from Gambia late last year.
Ndjai, who appeared at a news conference after declaring himself the head of the military, said the prime minister and army chief should be put on trial.
President Malam Bacai Sanha told reporters the events were a problem between soldiers. He said he will try to find a way to resolve the dispute.
Guinea-Bissau has a history of instability. Mutinous soldiers assassinated President Joao Bernardo Vieria in March of last year. The murder was apparently to avenge the killing of the army chief of staff a day earlier.
Mr. Sanha was elected president in July. He spent time in a French hospital late last year.
Some information for this report was provided by AP.