Islamist fighters in southern Somalia say Western forces have launched a night-time raid on one of their bases.
The militant group al-Shabab told the BBC “white soldiers” had arrived by boat at the port of Barawe and rebels had repulsed them, losing a fighter.
No-one has admitted the attack. US and French special forces have carried out raids in Somalia in recent years.
It is not clear whether it is linked to last month’s attack in neighbouring Kenya, which al-Shabab has claimed.
At least 67 people were killed after militants stormed the Westgate shopping centre in the capital, Nairobi, on 21 September.
The BBC’s Mark Doyle recently travelled with African Union peacekeepers into an al-Shabab-controlled area of Somalia
Residents in Barawe, which is controlled by militants, say they were woken up by heavy fighting before dawn on Saturday.
“Gunfire broke out for about 10-15 minutes,” an eyewitness told AFP news agency.
Commando raids on al-Shabab
- 5 October 2013: Helicopter and boat strike by unknown forces on Barawe
- 12 January 2013: Two French commandos killed in failed mission to rescue agent held in Bulo Marer
- 14 September 2009: US Navy commandos kill Kenyan-born al-Qaeda commander Saleh Ali Saleh Nabhan in raid on Barawe
It is not clear who the target of the raid was.
Several residents are quoted as saying the soldiers tried to storm a house sheltering senior al-Shabab leaders.
However, an unnamed Somali intelligence official told the Associated Press news agency that the targets of had been “high-profile” foreigners.
Local al-Shabab commander Mohamed Abu Suleiman said the raid had failed and the group remained in control of Barawe.
Western navies tasked with fighting piracy patrol the seas off Somalia, which has been beset by conflict for more than two decades.
In 2009, US Navy commandos attacked and killed an al-Qaeda leader, Kenyan-born Saleh Ali Saleh Nabhan, in a daylight raid on Barawe.
Washington has also used drones in Somalia to support the government and African Union forces in their battle against al-Shabab.
France carried out an unsuccessful raid to free a French intelligence agent in January. Two French commandos were killed and al-Shabab later reported that it had killed the agent.