NOUAKCHOTT, Mauritania—At the closing ceremony of U.S.-led military exercises in this expansive Saharan nation, American diplomat R. Clarke Cooper stepped to the podium and assured African military commanders that Washington stands ready to help them in their time of need.

“The U.S. has an unwavering and longstanding commitment to Africa,” Mr. Cooper, the State Department’s assistant secretary for political-military affairs, said late last month.

In fact, U.S. allies are increasingly worried that America’s commitment may be wavering when wide swaths of Africa face a surging threat from militants affiliated with al Qaeda and Islamic State.

U.S. Defense Secretary Mark Esper is conducting a world-wide review of troop commitments, in keeping with the Trump administration’s strategic tilt away from dispersed actions against terror groups and toward great-power competition with China and Russia.

Africa is the first region on Mr. Esper’s list, and military officers and lawmakers expect him to order fresh troop reductions on the continent, on top of the 17% cut in personnel over the past two years. The Pentagon hasn’t said when he will announce his decision.