A fighter had been killed in the raid, a spokesman for the al-Shabab Islamist group told Reuters news agency.
Reports speak of residents in the militant-controlled town being woken by heavy gunfire before dawn prayers.
Al-Shabab claimed responsibility last month for a deadly attack on a Kenyan shopping mall.
At least 67 people were killed after militants stormed the Westgate mall in the capital, Nairobi, on September 21.
An unnamed Somali intelligence official told the Associated Press that the targets of Saturday’s raid had been “high-profile” foreigners. The source did not say which country had carried out the operation.
Both US and French special forces have carried out raids on coastal targets in Somalia in recent years.
There was no immediate comment on Saturday’s alleged attack in Barawe from the Western-backed authorities in Somalia.
According to the Somali news website Midnimo, two helicopters were also involved in the raid.
“Westerners in boats attacked our base at Barawe beach and one was martyred from our side,” Sheikh Abdiasis Abu Musab, described as al-Shabab’s spokesman for military operations, told Reuters by telephone.
Another al-Shabab member, named as Abu Mohamed, told AP that “foreign” soldiers had attacked a house in Barawe.
Militants rushed to the scene to capture a foreign soldier but were unsuccessful, he added.
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.
The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…