KABUL, Afghanistan — A 22,000-pound bomb dropped by U.S. forces on an Islamic State hideout killed about three dozen militants in eastern Afghanistan, officials said Friday, raising further questions about the already controversial decision to use such powerful ordnance on the battlefield.

In comments Friday in Kabul, Gen. John W. Nicholson Jr., commander of U.S. forces in Afghanistan, defended the strike as “the right weapon against the right target,” and he called the militant hideout “an extensive obstacle to our progress.”

U.S. and Afghan troops went on the offensive against a local Islamic State branch in March. The group, which is based in Nangahar province, has staged deadly attacks on civilians but failed to break out of its stronghold in the east.

Nicholson said that the “chain of command allowed me the latitude to make assessments on the ground” and deploy the GBU-43, one of the largest non-nuclear bombs in the U.S. arsenal. Used for the first time in combat Thursday, the weapon “achieved its intended purpose,” he said.

U.S. and Afghan officials said no civilians were reported killed and that U.S. and Afghan Special Operations forces reached the site of the attack to assess the damage. According to Afghanistan’s Defense Ministry, the militant complex, which was a network of tunnels and bunkers, was destroyed. U.S. forces did not say how many militants might have been killed, but Afghan defense officials put the number at 36.

For its part, the Islamic State-linked Amaq News Agency denied that the bombing caused casualties among the militants, according to the SITE Intelligence Group, which monitors online postings from extremist groups and others. The Islamic State offered no evidence to support its claim.

“It was a powerful bomb; we felt it several kilometers away,” said Khair Mohammad Safi, police chief of the Achin district where the strike took place. Safi, who operates from a neighboring district for security reasons, said he could see flames from the explosion.

“The wave caused by [the blast] was strong. There was a huge fire,” he said. “This was the [Islamic State’s] main stronghold. They were annihilated. We needed such a bomb for this place.”

Achin, along the border with Pakistan, is a restive area where militants have long used the porous border to smuggle weapons and fighters. For nearly two years, it has been the site of fierce fighting between the Islamic State affiliate, known as Khorasan Province, and U.S. and Afghan forces.

Many of the district’s roughly 100,000 residents have fled, officials and aid agencies said. Even fighters with the rival Taliban-led insurgency have battled the extremists, who Nicholson said are largely made up of Pakistani and Uzbek militants.

Last week, Army Staff Sgt. Mark R. De Alencar, 37, was killed in Achin by small-arms fire. But earlier this month, the U.S. military said it had already reduced Islamic State-controlled territory in Afghanistan by two-thirds. About half of the group’s fighters had been killed, U.S. forces said.

“The use of drones turned out to be very effective against Daesh” in Afghanistan, said Aryan Youn, a lawmaker from Nangahar, using an Arabic acronym for the Islamic State. “If that was the case, why did the United States want to use such a sophisticated and powerful bomb?”

Local residents, she said, are worried about the impact of the explosion on their health and farmland. Achin is a heavily agricultural district.

The Taliban on Friday also issued a statement condemning the strike. Its fighters have been engaged in a years-long insurgency against the government and international forces in Afghanistan.

In a message distributed on the instant messaging app Viber, the Taliban said the United States had “no justification” for using such a powerful bomb during combat operations, calling it a “show” by U.S. forces to persuade the world it is battling the Islamic State.

Former Afghan president Hamid Karzai posted scathing criticism of the U.S. military Thursday on Twitter, calling the operation a “brutal misuse of our country as [a] testing ground for new and dangerous weapons” and calling on Afghans “to stop” the United States.