Al-Shabab says "Western" forces attacked a house in one of its coastal bases in the town of Barawe under the cover of dark, killing one rebel fighter.
Foreign forces landed on the beach at Barawe, about 180km south of Mogadishu, and launched an assault that drew gunfire from rebel fighters, Sheikh Abdiasis Abu Musab, said spokesperson for al-Shabab's military operations.
It was not immediately clear why the Barawe base had been targeted specifically, nor whether the assault was related to the attack on a Kenyan mall two weeks ago, which the al Qaeda-linked group said it carried out and which killed at least 67.
Western navies patrol the sea off Somalia – mired in conflict for more than two decades – and have in the past launched strikes on land from warships.
Three Somali intelligence officials in Mogadishu said they had been informed of the raid, but could not independently confirm that it had taken place. The town is fully controlled by the Islamist militia with almost no government presence.
No foreign military units typically involved in such operations in Somalia have said they were involved in the strike. Nato denied involvement, and a spokesperson for EU Navfor – Europe's counterpiracy mission – said, "We have not been involved in any operation there."
Two Western embassy officials in the region declined to comment.
The United States and French forces have carried out similar strikes in Somalia, but rarely confirm or give details of any such action.
Kenyan forces stationed in the southern parts of Somalia were unavailable for comment.
"Westerners in boats attacked our base at Barawe beach and one was martyred from our side," Musab said.
"No planes or helicopters took part in the fight. The attackers left weapons, medicine and stains of blood, we chased them," he said.
"Although we both exchanged grenades, the attackers had silencer guns, so the weapons heard were ours," he said.
Many residents said they were woken by the noise of heavy gunfire late on Friday night.
"We were awoken by heavy gunfire last night, we thought an al-Shabab base at the beach was captured," Sumira Nur, a mother of four told Reuters from Barawe on Saturday.
"We also heard sounds of shells but we do not know where they landed. We don't have any other information," she said.
Although the US does not report its activities in Somalia, it has used drones in recent years to kill Somali and foreign al-Shabab fighters.
In January 2012, members of the elite US Navy Seals rescued two aid workers after killing their nine kidnappers.
The latest raid on the insurgents came in January, when the French military used helicopters to attack an al-Shabab base in a southern Somalia village to rescue a French hostage. Two French commandos were killed and the insurgents later claimed they had killed the agent.
Driven out of Mogadishu
The French army said it was not part of the latest raid.
"The French army forces have no soldiers in Somalia," said a spokesperson for France's joint chief of staff.
Asked about whether Western forces had landed on the Somali shores in Barawe, the spokesperson said: "The (French) army has no one in the area, no one in contact with the al-Shabab."
Western nations are worried that Somalia will sink back into chaos and provide a launchpad for Islamist militancy despite a fragile recovery after two decades of war.
Al-Shabab were driven out of Mogadishu in late 2011 and are struggling to hold on to territory elsewhere in the face of attacks by Kenyan, Ethiopian and African Union forces trying to prevent Islamist militancy spreading out from Somalia. Al-Shabab wants to impose its strict version of sharia, or Islamic law, across the Horn of Africa state. – Reuters