One U.S. service member was killed and two others wounded after an attack on U.S. troops in Somalia on Thursday that came a month after the first major deployment of American troops to the African nation since 1994.

The U.S. troops were conducting an advise-and-assist mission with the Somali National Army when they were attacked about 40 miles west of Mogadishu, according to a statement from U.S. Africa Command. A Pentagon official told the Washington Examiner that the dead service member was a Navy SEAL.

The identities of the individuals are not known; the military generally releases the names of service members killed in action 24 hours after next of kin is notified.

At the Pentagon, a spokesman said the U.S. troops were providing helicopter transport and other logistical support for a mission that was being conducted by Somali troops against an al-Shabab compound.

"This particular compound had been associated with attacks on facilities that we use, and that our Somali partners use nearby," said Navy Capt. Jeff Davis.

"First and foremost this was a Somali mission, this was their mission," Davis said. "We helped bring them in with our aircraft, and we were there maintaining a distance back supporting the operation. That's when our forces came under fire."

Davis declined to discuss the rules of engamenet for the U.S. special operations forces, except to say that they were not operating under any new authorities.

Under standard U.S. miliitary doctrine for "advise and assist" missions, American troops are allowed to accompany partner forces to what's called the last point of cover and concealment.

In early April, a few dozen American troops from the 101st Airborne Division were deployed to Somalia to advise that country in its fight against al-Shabab extremists. While the U.S. usually has a small group of military advisers in Somalia, last month's deployment was the largest arrival of American troops since 1994.

"Al-Shabaab presents a threat to Americans and American interests. Al Shabaab's affiliate, al-Qaeda has murdered Americans; radicalizes and recruits terrorists and fighters in the United States; and attempts to conduct and inspire attacks against Americans, our allies and our interests around the world, including here at home," the statement said. "U.S. forces are assisting partner forces to counter al-Shabaab in Somalia to degrade the al-Qaeda affiliate's ability to recruit, train and plot external terror attacks throughout the region and in America."

The U.S. had a much larger presence as part of a United Nations peacekeeping mission in the early 1990s. That presence began coming to an end when two Black Hawk helicopters were shot down in Mogadishu during a military operation, leading to the death of 18 Americans in a 15-hour battle in the streets.

Travis J. Tritten and Jamie McIntyre contributed to this report.