WASHINGTON — The American military has escalated a battle against the Shabab, an extremist group affiliated with Al Qaeda, in Somalia even as President Trump seeks to scale back operations against similar Islamist insurgencies elsewhere in the world, from Syria and Afghanistan to West Africa.

A surge in American airstrikes over the last four months of 2018 pushed the annual death toll of suspected Shabab fighters in Somalia to the third record high in three years. Last year, the strikes killed 326 people in 47 disclosed attacks, Defense Department data show.

[For more stories about the experiences and costs of war, sign up for the weekly At War newsletter.]

And so far this year, the intensity is on a pace to eclipse the 2018 record. During January and February, the United States Africa Command reported killing 225 people in 24 strikes in Somalia. Double-digit death tolls are becoming routine, including a bloody five-day stretch in late February in which the military disclosed that it had killed 35, 20 and 26 people in three separate attacks.

Africa Command maintains that its death toll includes only Shabab militants, even though the extremist group claims regularly that civilians are also killed. The Times could not independently verify the number of civilians killed. The rise in airstrikes has also exacerbated a humanitarian crisis in the country, according to United Nations agencies and nongovernmental organizations working in the region, as civilians are displaced by conflict and extreme weather.