The heavily-armed AC-130 gunship can fly at night (file photo)

The militias were reported to have been tracked by aerial reconnaissance and then attacked by a US gunship launched from a US military base in Djibouti.

The US says Somali Islamists sheltered al-Qaeda operatives linked to the 1998 US embassy bombings in East Africa.

The Somali transitional government says many people were killed in the raid.

The air strikes are taking place just a few days after the Union of Islamic Courts, which had taken control of much of central and southern Somalia during the past six months, was routed by soldiers from Ethiopia and Somalia's transitional government.

The US accuses the Islamists of having links to al-Qaeda - charges they deny.

A Pentagon spokesman, Bryan Whitman, confirmed that the US struck southern Somalia on Sunday, and said the target was al-Qaeda leadership believed to be in the area.

'Boy killed'

Witnesses told the BBC Somali service that areas near the town of Afmadow were being bombed on Tuesday.

They report hearing heavy firing in a number of areas and have seen military helicopters flying overhead.

On Monday, the nearby village of Hayo was bombed.

The US has a right to bombard terrorist suspects who attacked its embassies in Kenya and Tanzania

Somali interim president

Abdullahi Yusuf

Twin US aims in Somalia Fact file: AC-130 gunship

"My four-year-old boy was killed in the strike," Mohamed Mahmud Burale told the BBC from the area.

Local MP Abdulkadir Haji Mohamoud Dhagane told the BBC that 27 people, mostly civilians, had been killed near Afmadow.

"Thousands of Somalis are caught between the rock and hard place as they are in the middle of air strikes, Ethiopian tanks and the Kenyan soldiers who have blocked the border," he said.

Afmadow is 250km north of Ras Kamboni, close to the Kenyan border, where Islamist fighters have been attacked by Ethiopian and government forces.

The island of Badmado off Ras Kamboni was also hit by air strikes on Monday afternoon.

The bombing is the first overt military action by the US in Somalia since 1994, the year after 18 US troops were killed in Mogadishu.

The attack was carried out by an Air Force AC-130, a heavily-armed gunship that has highly effective detection equipment and can work under the cover of darkness.

Credible reports suggest that the Ethiopian air force has set up a base in Kismayo, with two MiG fighters and four helicopter gunships, which may be taking part in the raids.

Al-Qaeda

Somalia's interim President Abdullahi Yusuf backed the US action.

HAVE YOUR SAY They can all leave us alone, we Somalis already have a full plate when it comes to wars

Maheran Man, Melbourne, Australia

Send us your comments

More than 250 people died in the 1998 attacks in Nairobi and Dar es Salaam, for which al-Qaeda has claimed responsibility.

The US also holds the same cell responsible for attacks on an Israeli aircraft and Israeli-owned hotel in Kenya in 2002, in which 15 people died.

In other developments: