KABUL, Afghanistan -- Afghan officials say the attack on a tunnel complex in eastern Afghanistan with the largest non-nuclear weapon ever used in combat by the U.S. military left 36 Islamic State of Iraq and Syria (ISIS) fighters dead.

There were no civilian casualties, according to the Ministry of Defense statement, which also said several ISIS caves and ammunition caches were destroyed. U.S. officials said precautions were taken to avoid civilian casualties.

The ISIS commander in the area was among the dead, Afghanistan’s presidential palace said.

Get Breaking News Delivered to Your Inbox

Hakim Khan, 50, a resident of Achin district where the attack took place, welcomed the attack on ISIS, saying, “I want 100 times more bombings on this group.”

But fierce opposition among Afghans also surfaced.

Former President Hamid Karzai condemned the strike, saying it “is not the war on terror but inhuman, and (the) most brutal misuse of our country as (a) testing ground for new and dangeorus weapons. It is upon us,Afghans, to stop the USA.”

Karzi said, “I vehemently and in strongest words condemn the dropping of the latest weapon.”

Since news of the strike broke, most social media users in Afghanistan criticized both the Afghan government and U.S. One user calleld it “our generation’s “Hiroshima,” adding, “I’m still in shock.”

The bomb, known officially as a GBU-43B, or massive ordnance air blast weapon, but also known as the “mother of all bombs” unleashes 11 tons of explosives.

When it was developed in the early 2000s, the Pentagon did a formal review of legal justification for its combat use.

In this U.S. Air Force handout, a GBU-43/B bomb, or Massive Ordnance Air Blast (MOAB) bomb, explodes Nov. 21, 2003, at Eglin Air Force Base, Florida. MOAB is a 21,700-pound that was dropped from a plane at 20,000 feet. Getty

President Trump called the attack a “very, very successful mission.”

The U.S. military headquarters in Kabul said in a statement that the bomb was dropped at 7:32 p.m. local time Thursday on a tunnel complex in Achin district of Nangarhar province, where the Afghan affiliate of ISIS has been operating. The target was close to the Pakistani border.

The U.S. estimates 600 to 800 IS fighters are present in Afghanistan, mostly in Nangarhar. The U.S. has concentrated heavily on combatting them while also supporting Afghan forces battling the Taliban. Just last week a U.S. Army Special Forces soldier, Staff Sgt. Mark R. De Alencar, 37, of Edgewood, Maryland, was killed in action in Nangarhar.

The MOAB is a custom-made Air Force weapon that has been in the arsenal for more than a decade but had never been used on the battlefield, although it was available throughout the Iraq war. It is designed to hit softer targets such as surface facilities, tunnel entrances and troop concentrations. It is pushed out the rear of the launching aircraft, guided to its target by GPS and slowed by a parachute.]

The site where the "mother of all bombs" was dropped on an ISIS complex in Afghanistan. CBS News

A separate non-nuclear weapon known as the Massive Ordnance Penetrator, or MOP, which is larger in its physical dimensions but carries a smaller load of conventional explosives, is designed to take out deeply buried targets like reinforced bunkers. The MOP has never been used in combat.

In its 2003 review of the legality of using the MOAB, the Pentagon concluded that it could not be called an indiscriminate killer under the Law of Armed Conflict.

“Although the MOAB weapon leaves a large footprint, it is discriminate and requires a deliberate launching toward the target,” the review said, adding, “It is expected that the weapon will have a substantial psychological effect on those who witness its use.”

Adam Stump, a Pentagon spokesman, said the bomb was dropped from a U.S. MC-130 special operations transport. He said the bomb had been brought to Afghanistan “some time ago” for potential use.

Army Gen. John W. Nicholson, commander of U.S. forces in Afghanistan, said in a written statement that the strike was designed to minimize the risk to Afghan and U.S. forces conducting clearing operations in the Achin area “while maximizing the destruction” of ISIS fighters and facilities. He said ISIS has been using improvised explosive devices, bunkers and tunnels to strengthen its defenses.

“This is the right munition to reduce these obstacles and maintain the momentum of our offensive against ISIS-K,” he added, using the U.S. military’s acronym for the ISIS affiliate.

Ismail Shinwari, the governor of Achin district, said the U.S. attack was carried out in a remote mountainous area with no civilian homes nearby. He said there has been heavy fighting in the area in recent weeks between Afghan forces and ISIS militants.

White House spokesman Sean Spicer said ISIS fighters had used the tunnels and caves in Achin to maneuver freely.

“The United States takes the fight against ISIS very seriously and, in order to defeat the group, we must deny them operational space, which we did,” Spicer said.