A U.S. soldier who was missing after an ambush by militants in Niger has been found dead, according to defense officials.

The attack killed three U.S. soldiers from the 3rd Special Forces Group and four soldiers from Niger, one of whom was serving as an interpreter. Two other American soldiers were wounded and evacuated to Landstuhl.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"The body of another U.S. Service member has been recovered from the area of attack bringing the number of U.S. service members killed in this attack to four," said Col. Rob Manning, spokesperson for the Defense Secretary. "Our thoughts and prayers are with the family members of the deceased. We will share more information as it becomes available related to this attack."

A senior U.S. official said the missing soldier did activate his military beacon and the U.S. military was able to track him for a time before the signal faded.

One official said a 12-man team of U.S. soldiers from the Army's 3rd Special Forces Group was operating with approximately 30 Forces Armees Nigeriennes (FAN) on a train and advise mission near Tongo Tongo, Niger, just miles from the Mali border. Militants, both Al Qaeda in the Islamic Maghreb (AQIM) and ISIS, have been using a nearby route to travel back and forth into Mali and back to a base camp in Niger and traffic in black market merchandise, the official said. The partner forces were working to disrupt the so-called rat line and interdict the militants.

Nigerien service members reacting to contact during Exercise Flintlock 2017 in Diffa, Niger, on March 3, 2017. US Army/SPC. Zayid Ballesteros via EPA file

While out scouting the route, the group came under attack from more than 40 enemy fighters, firing from numerous directions with small arms, the official said. The U.S. and Niger soldiers scattered to take cover. Once the scene was clear, the U.S. troops realized one of their own was missing, an official said. The U.S. began an extensive search and rescue operation, ending when the troops found the body of their fellow soldier on Friday. Officials would not say how he died.

On Friday the Pentagon identified the three Special Forces soldiers killed in the initial ambush as Staff Sgt. Bryan Black, Staff Sgt. Jeremiah Johnson, and Staff Sgt. Dustin Wright.

A U.S. military official said the U.S. military has been operating in that area to help the local forces fight terrorism and to disrupt these rat lines. "This is about black market resources which terrorists use to gain revenue that helps them recruit, expand and export attacks," the official said.

Niger and Mali serve as bridges between north and south Africa. ISIS has been attempting to mine gold in Niger to sell on the black market and finance world terrorism, the official said, adding that ISIS uses these North South transit routes to go north for easier access to Europe and the West.