Mozambique says its troops are fighting to regain control of the key port of Mocimboa da Praia, following multiple reports that it had fallen to Islamist militants on Wednesday.
The city is near the site of natural gas projects worth $60bn (£46bn).
The military says there is ongoing action to “neutralise” the Islamic State group-linked militants, who have been using local people as shields.
It follows days of fighting for the port in the country's gas-rich north.
Dozens of soldiers are reported to have been killed, and a patrol boat sunk, while the army says it has killed about 60 militants.
BBC Africa correspondent Andrew Harding says the loss of the city was a serious blow to Mozambique's military, who are struggling to contain a growing rebellion in the gas-rich province of Cabo Delgado.
Mocimboa da Praia is used for cargo deliveries to the offshore projects about 60km (40 miles) away, which are being developed by oil giants including Total.