The four Special Forces soldiers who died in Niger on Oct. 4 were on a mission to advise and train forces in that country to fight against terrorist elements there, Marine Corps Gen. Joseph F. Dunford Jr., the chairman of the Joint Chiefs of Staff, said.

“Our soldiers are operating in Niger to build the capacity of local forces to defeat violent extremism in West Africa,” Dunford said, during an Oct. 23 Pentagon press briefing.

Four soldiers — Staff Sgt. Bryan Black, Sgt. La David Johnson, Staff Sgt. Jeremiah Johnson, and Staff Sgt. Dustin Wright — were killed while on patrol with Nigerien troops when they were attacked. The four had embarked on a reconnaissance mission from Niamey, the capital, to a site roughly 50 miles away near the village of Tongo Tongo. They were returning back to their base when they were attacked by 50 enemy fighters brandishing small arms, rocket-propelled grenades and technical vehicles, Dunford said. The team fought for an hour before calling for close-air support, and it took another hour for French Mirage fighters to arrive overhead.

French military helicopters evacuated two other soldiers who were wounded. The remains of Black, Jeremiah Johnson and Wright were recovered Oct. 4. Comrades found La David Johnson’s remains two days later.

Dunford said that roughly 800 U.S. troops now operate in Niger, along with some 4,000 French troops. They are there, Dunford said, because of the increased presence by Boko Haram, al Qaida and Islamic State elements.