WASHINGTON — The bomb that the United States dropped on an Islamic State cave complex in Afghanistan on Thursday was big — at 22,000 pounds, the most powerful conventional weapon in the American arsenal. Arguably, even bigger were the messages it sent, whether by design or not.

To potential adversaries like Syria and North Korea, the bombing could signal deterrence. For the American public, it underscored the Pentagon’s more aggressive stance under President Trump than under his predecessor, whose administration never even debated using the weapon.

Dozens of militants were killed, Afghan officials said. American commanders said that the bomb was chosen because it fit the target, a series of tunnels with dug-in positions nearby used by militants in a remote part of eastern Afghanistan, and that it posed little or no risk to civilians. The bombing spared troops from fierce fighting in caves.

It also illustrated how Mr. Trump is releasing commanders from Obama-era restrictions on the use of force and how the top United States commander in Afghanistan, Gen. John W. Nicholson Jr., was seeking to showcase Afghanistan’s myriad threats. General Nicholson, who has requested reinforcements to the 8,500 American troops stationed there, drew his bosses’ attention by dropping what the Pentagon has nicknamed the “mother of all bombs.”