President Joao Bernardo Vieira of Guinea-Bissau in West Africa was killed on Monday in an apparent revenge attack for the slaying of the head of the army.
Gunfire resounded in Bissau city in the early hours, subsiding at first light.
The armed forces said they were "managing" the crisis.
The United Nations, African Union, EU, Portugal and United States condemned the killings and urged the restoration of order.
The president was reportedly killed in his house, having refused to leave with Angolan diplomats who took his wife to safety.
Mr Vieira was a former military ruler who was ousted after a civil war in the 1990s and returned to power in an election in 2005.
He had been at odds with armed forces chief of staff General Batista Tagme Na Wai, who was killed on Sunday.
According to the constitution: if the president dies, the speaker of parliament runs the country until new elections.
Analysts say political instability in Guinea-Bissau has been exacerbated in the past few years as Latin American drugs gangs have taken advantage of a poorly policed coastline and remote airstrips to smuggle cocaine through Africa to Europe.