The three U.S. Army Special Forces soldiers killed in Niger were part of a broad American effort to train and support local forces as a bulwark against the emergence of militant groups in northwestern Africa.

U.S. Africa Command has deployed trainers and advisers throughout the continent to build relationships with local forces and support their counter-terrorism efforts.

“This Niger operation is very typical of how the U.S. operates on the continent,” said Joshua Meservey, a senior policy analyst at the Heritage Foundation, a Washington, D.C., think tank. Niger is a longtime U.S. counter-terrorism partner in the region.

The U.S. has occasionally attacked terrorists with drones or small raids in Africa, but the main mission of American troops there is to support local armed forces.

The team members killed in Niger were part of a contingent of about 800 U.S. troops in the country, U.S. Africa Command said. The U.S. is also establishing a drone base there.

The U.S. troops were killed Wednesday while “providing advice and assistance” to Niger’s forces in the southwestern part of the country, Africa Command said in a statement. A “partner nation” serviceman was also killed in the attack.

Two American soldiers were injured and have been evacuated to Landstuhl Regional Medical Center in Germany, where they are in stable condition.

It is not clear what group was responsible for the attack.

The country borders Mali and Libya, two unstable countries where al-Qaeda and the Islamic State have developed terrorist strongholds.

MORE: Green Berets killed in ambush