The commando attack in a Somali village today is the latest in 16 years of efforts by the United States military in the lawless country on the horn of Africa.

The most notorious engagement was the Black Hawk Down battle of October 3 1993, in which 18 US soldiers and as many as 500 Somalis were killed in a 17-hour battle in the capital city of Mogadishu. US forces on a UN-sanctioned mission to capture warlord Mohamad Farrah Aidid were drawn into the US military's biggest fire fight since the Vietnam war, and Somali fighters downed five US helicopters.

The US public was shocked by televised images of Somalis dragging the corpses of US soldiers through dusty Mogadishu streets, and president Bill Clinton ordered the withdrawal of US forces from the country the next day. The fight had a lasting impact on US foreign policy, and contributed to Clinton's refusal to intervene in Rwanda during the 1994 genocide.

But the US has remained engaged in Somalia, although the rationale for military action has changed from facilitating a humanitarian mission to preventing Islamist terrorists from taking root. The US has not send a large deployment of troops, but has pursued militants through a combination of air attacks, clandestine ground assaults, and military cooperation with neighbouring Ethiopia.

In January 2007, US airforce gunships attacked several sites in southern Somalia in an effort to kill three suspects in the 1998 bombings of US embassies in Kenya and Tanzania. British humanitarian group Oxfam later said the attacks killed 70 people and destroyed vital water resources.

Later that year, US officials told the New York Times that the country's military had shared intelligence on Somali Islamic militants' positions with Ethiopian forces, and that an elite US commando unit based in Ethiopia had launched attacks inside Somalia.

In May 2008, a US air strike killed Aden Ayro, who was suspected of killing four aid workers and a scholar.

The US navy has deployed warships to combat piracy in the region, much of it in boats launched from the Somali coast. In February 2009, US snipers killed three pirates who had abducted an American captain during an abortive hijack attempt on a merchant ship.