The United States military has been training and advising African Union and Somali government forces in the country while becoming more directly involved in its civil war for the past several years. Last month, two American Navy SEALs were wounded and one was killed while accompanying Somali forces on a raid against Shabab militants, the first American combat fatality in Somalia since the 1993 “Black Hawk Down” battle in Mogadishu.

Toward the end of the Obama administration, the White House signed off on a proposal to deem the Shabab an affiliate of Al Qaeda. That brought the insurgent group — which sprouted up in 2007 after Ethiopia, with American backing, invaded Somalia and overthrew an Islamist council that had briefly taken control of the country — under the congressional authorization to use military force against the perpetrators of the Sept. 11, 2001, terrorist attacks.

Soon after Mr. Trump took office, the Defense Department proposed a further escalation. It wanted Mr. Trump to declare parts of Somalia to be an area of active hostilities, exempting it from the need to obey special targeting limits, known as the Presidential Policy Guidance, that Mr. Obama imposed in 2013 for counterterrorism strikes outside conventional war zones.

Those limits included an obligation to receive high-level interagency approval before carrying out such a strike; a need for the target, and an individual, to pose a threat to Americans, not just to be part of the enemy force; and a requirement of near certainty that no civilians would be killed.

Aspects of those limits had been eroding in Somalia, because in 2016, the United States military increasingly invoked an exception for airstrikes carried out under the rubric of self-defense — including, sometimes, the defense of Somali government forces even when no American advisers were under threat.

For instance, in March 2016, American aircraft struck a Shabab training camp, killing around 150 people who American officials said were newly minted fighters assembled for a graduation ceremony. Africa Command officials justified the strike, which they undertook without going through the 2013 process, as a matter of self-defense, saying they believed the militants intended to attack a peacekeeping base.

Late this March, Mr. Trump signed off on the Pentagon’s proposal to exempt much of Somalia from the 2013 limits, clearing the way for the Pentagon to carry out purely offensive strikes, and without going through interagency vetting.