Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Navy SEAL was killed during a gunfight in Somalia with the terrorist group al-Shabaab that also injured two other SEALs and an interpreterlate Thursday, U.S. defense officials told NBC News.

The attackers were "neutralized" and the wounded service members were taken to neighboring Djibouti, said an official.

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

The SEALs were conducting an operation with Somali commandos to target a local leader of al-Shabaab. U.S. helicopters dropped the U.S. and Somali forces off near Barii, Somalia, about 40 miles west of Mogadishu.

Before the partnered force reached its target, it came under heavy fire from al-Shabaab fighters, a second U.S. military official in the region told NBC News.

In the ensuing firefight "several" al Shabaab fighters were killed, according to a U.S. military official, and three SEALs were wounded, as was an interpreter. No U.S. airstrikes were called in to support the ground forces.

The Americans were medevaced to nearby Djibouti but one later died of his injuries. All of the al-Shabaab fighters were killed, but U.S. military officials are still analyzing intelligence to determine whether the actual target of the mission was among those killed.

A Somali soldier stands by the wreckage of a minibus that was destroyed by a suicide car bomb attack in Mogadishu on April 9. Farah Abdi Warsameh / AP

U.S. Steps Up Efforts Against al-Shabaab

According to one official, there are about 50 American special forces now working with African Union Mission in Somalia and local national commandos as part of a "train and advise mission," and the U.S. military has been moving in and out of Somalia since last year. In recent weeks both the U.S. and Somalia have stepped up their efforts against al-Shabaab. Last month, President Donald Trump approved expanded operations against the militants, including more aggressive airstrikes.

Also last month, Somalia's new military chief survived a suicide car bomb attack that killed 13 people, according to police. Al-Shabaab, which claimed responsibility for the incident, is based in Somalia but has also said it was behind major attacks elsewhere in East Africa. The al-Qaeda-allied group was chased out of Mogadishu years ago but continues to fight the country's United Nations-backed government. It promotes the Wahhabi version of Islam and has imposed Sharia law in areas under its control.