Armed soldiers move on the main artery of the capital after heavy gunfire around the presidential palace in Bissau, Guinea Bissau February 1, 2022. [Reuters]

At least six people were killed in a failed attempt to overthrow Guinea-Bissau's President Umaro Sissoco Embalo, state radio said on Wednesday, as residents of the capital cautiously returned to daily life.

The dead in Tuesday's assault included four assailants and two members of the presidential guard, it said. Embalo had announced on Tuesday night that the situation was under control after gunfire rang out for more than five hours near a government compound where he was holding a cabinet meeting.

The West African country, which has a population of about 2 million, has witnessed 10 coups or attempted coups since independence from Portugal in 1974. Only one democratically elected president has completed a full term.

West Africa has been hit by a string of military takeovers over the past 18 months - including two in Mali, one in Guinea and one in Burkina Faso just last week - leading analysts to warn about "coup contagion".

The context appeared different in Guinea-Bissau. It remains unclear who was behind the attack but Embalo suggested it was linked to the government's fight against drug trafficking rather than an army plan to seize power.

"It wasn't just a coup. It was an attempt to kill the president, the prime minister and all the cabinet," he said on Tuesday night.

The attack "was well prepared and organised and could also be related to people involved in drug trafficking", he said, without giving details.

An impoverished country on the coast sandwiched between Guinea to the south and Senegal to the north, Guinea-Bissau is a major transit point for Latin American cocaine headed for Europe, contributing to its perpetual instability.

It has been mired in political deadlock and infighting, but does not have the same security concerns as Mali and Burkina Faso, where a spiralling Islamist insurgency has killed thousands and eroded faith in civilian governments in recent years.

The main road linking the city centre of the capital Bissau to the airport remained closed on Wednesday morning since it goes past the presidential palace, but banks and shops had reopened and people were venturing out, a Reuters reporter said.

"The image of my country has once again been tarnished throughout the world," complained Edson Gomes, a mechanic.

The Economic Community of West African States (ECOWAS) Commission President Jean-Claude Kassi Brou said in a post on Twitter that the army was responsible for the coup attempt.

"I welcome the failure of the military coup attempt in Guinea-Bissau, which was an attack on democracy and the people," he said.

France's ambassador to Guinea-Bissau, Terence Wills, visited Embalo on Wednesday and congratulated him for the "sang-froid" he showed during the attack.