Helicopter-borne US special forces carried out a revenge raid in Somalia that killed a top al-Qaida commander high on the FBI's most wanted terrorist list, US officials in Washington said last night.

Saleh Ali Nabhan, 28, a leader of al-Shabab, a group closely linked to al-Qaida, was alleged to have been involved in the bombings of US embassies in Kenya and Tanzania in 1998 that killed 229 people. He is also accused of involvement in attacks in 2002 on a hotel in Mombasa, Kenya, popular with Israelis, in which 15 people died, and a botched missile attack on a plane carrying tourists from Mombasa to Israel.

A US official said two men travelling in a car in Somalia were killed when helicopters opened fire yesterday, and two others were wounded and captured. Another official said it was most likely that Nabhan, who had been on the FBI wanted list for several years, had been killed.

Witnesses on the ground said military helicopters strafed a car carrying Nabhan, killing some passengers and wounding others, south of Mogadishu. The helicopters landed and took the wounded men, and possibly Nabhan's body, with them, witnesses said.

The US had tried several times in the past to kill Nabhan, including firing two Tomahawk cruise missiles.

A Pentagon spokesman, Bryan Whitman, declined to comment "on any alleged operation in Somalia", as did the White House.

Bill Clinton's administration drastically reduced its military involvement in Somalia after the Black Hawk Down fiasco in 1993, but George Bush resumed limited military operations, with an attack by one of its gunships on suspected al-Qaida members in 2007. The Obama administration, fearful of growing al-Qaida influence in the Horn of Africa, has indicated a willingness to provide more military and economic support for the government against insurgents such as Nabhan's group, al-Shabab.

Hillary Clinton, the US secretary of state, on a visit to Africa last month, met the Somali president, Sheikh Sharif Ahmed, who controls only a small portion of the country, and promised him support in the fight against al-Shabab, the biggest of the insurgent groups.

"Certainly if al-Shabaab were to obtain a haven in Somalia which could then attract al-Qaida and other terrorists actors, it would be a threat to the United States," she said.

Yesterday's attack took place near Roobow village in Barawe district, an area controlled by al-Shabaab about 150 miles south of Mogadishu. A witness, Abdi Ahmed, told the Associated Press that six helicopters "buzzed" the village before two of them opened fire. The helicopters then landed and white foreign soldiers got out, he said.

A witness on the ground said they took only two wounded men, but a US official said they also took Nabhan's body.

The US accused Nabhan, who was born in Kenya, of running training camps in Somalia for local and foreign fighters.

Al-Shabab confirmed to al-Jazeera that the attack had taken place, but refused to give more details.

A Somali government source told Reuters: "Nabhan and four other top foreign commanders of militant groups were killed in the raid. These young fighters do not have the same skills as their colleagues in Afghanistan or elsewhere when it comes to foreign air strikes. They are in confusion now. I hope the world takes action."

Some locals reported that the foreign troops had French flags on their uniforms, but the French defence ministry denied having a military presence in the area at the time. France has troops stationed in neighbouring Djibouti. In May last year, US aircraft killed the then leader of al-Shabaab, Aden Hashi Ayro, in Duasmareb.