NAIROBI, Kenya — United States forces assisted Somali commandos in killing several members of the Shabab militant group in an attack last week, an American military spokesman said on Tuesday, but it was not clear whether any high-level operatives had been eliminated.

The raid took place last Wednesday, when a contingent of elite American troops acting as military advisers accompanied Somali forces in an assault on a Shabab checkpoint in Saakow, a remote outpost in southern Somalia that has become a notorious hide-out for the militants.

American Special Forces have been quietly working in Somalia for years, with increasing success.

As the Somali-led force approached the checkpoint, the militants opened fire, setting off a gun battle, said Lt. Cmdr. Anthony Falvo, a spokesman for the United States military’s Africa Command. Three Shabab militants died; no Americans were hurt.

“U.S. advisers accompanied the Somali-led force, which is standard for what we do in that area,” said Commander Falvo, who added that the American forces were armed but did not participate in the firefight.