Mortars blasted through the capital of the small, coup-prone nation of Guinea-Bissau as the military sealed off the city's central area and lobbed grenades at the prime minister's home, according to a diplomat and witnesses.
The West African regional bloc known as ECOWAS said it "formally condemns any attempt at a coup d'etat", said Daniel Kablan Duncan, president of the body's Council on Mediation and Security.
The violence comes just weeks before the country's presidential run-off vote, which prime minister Carlos Gomes was favoured to win.
There have been fears of a coup ever since Guinea-Bissau's president died of complications from diabetes in January, leaving an interim leader in charge of the chronically unstable country known for cocaine trafficking.
On Thursday, shooting started after the state radio station signal inexplicably went dead. The whereabouts of the nation's interim president, Raimundo Pereira, was unknown.
A military official, who, like the diplomat, could not be named, said the soldiers had encircled the home of Mr Gomes and were attacking the building with grenades. It was not clear if the premier was at home when the shooting started.
The violence took even seasoned diplomats by surprise. One official, speaking by telephone from his office, said: "I am at the office and I am prevented from leaving."
"The downtown area has been sealed off by the military ... I can also tell you that all Guinea-Bissau radio has been taken off the air since 8pm local time and the whereabouts of the prime minister and interim president are unknown."
Guinea-Bissau has weathered successive coups, attempted coups and a civil war since winning independence from Portugal in 1974. It has been further destabilised by a growing cocaine trade, fuelled by traffickers from Latin America who discovered the nation's archipelago of uninhabited islands several years ago.
They used the deserted islands to land small, twin-engine planes loaded with drugs, which are then parcelled out and carried north for sale in Europe. The traffickers, according to analysts, have bought off key members of the government and the military, creating a narcostate.