Foreign special forces in an attack helicopter staged a nighttime raid on a key base of Somalia's Al-Qaeda-linked Shebab, claiming the assault had failed, AFP reports citing the insurgents.
"The enemy of Allah tried to surprise the mujahedeen commanders with a night attack using a military helicopter, but they were taught a lesson and they have failed," Mohamed Abu Suleiman, the Shebab commander in the southern Somali port of Barawe, told AFP.
Witnesses said commandos -- presumed to be from a Western nation -- rappelled from the helicopter as they tried to storm a house belonging to a senior Shebab commander.
"Our mujahedeen fighters inside the house fought back and the cowards ran away," Suleiman added.
Witnesses reported heavy gunfire as the helicopter hovered overhead.
"I woke to the sound of the helicopter above the neighbourhood, then a few minutes later, there was fighting, gunfire broke out for about 10-15 minutes," a local resident said, who asked not to be named.
"We don't know what exactly happened, but it was an organised attack targeting the house where some Al-Shebab commanders were."
Shebab fighters, who control large parts of rural southern Somalia, claimed responsibility for an attack on Kenya's Westgate shopping mall last month, in which at least 67 people were massacred.
Barawe lies some 180 kilometres (110 miles) south of the capital Mogadishu, and is one of the few ports left in Shebab control.
Residents of Barawe said Shebab were heavily deployed on the streets of the port on Saturday morning.
"People are being stopped from getting close to the scene of the attack, heavily armed Shebab soldiers have cordoned off the area," said Mohamed Nune, a resident.
Multiple nations operate special forces in the wider Horn of Africa region, and have deployed similar missions in the past.
In January, elite French forces staged an overnight operation involving some 50 troops and at least five helicopters in southern Somalia in a failed bid to rescue a captured intelligence officer held by Shebab forces.
Last year, US Navy SEALs flying at least six military helicopters swooped into northern Somalia to rescue two aid workers held by pirates.