(CNN) -- In its second major display of military might in one week, the US dropped its most powerful non-nuclear bomb on ISIS positions in a remote part of Afghanistan.
Afghan officials said 36 militants were killed in the strike in Nangarhar province, near the Pakistan border, where the US military previously estimated ISIS had 600 to 800 active fighters.
The US Department of Defense released a video of the bombing.
The GBU-43/B Massive Ordinance Air Blast bomb (MOAB) was dropped on a network of fortified underground tunnels ISIS had been using to stage attacks on government forces Thursday night.
The GPS-guided munition is known as the "mother of all bombs" and is capable of destroying an area equivalent to nine city blocks.
The blast from the weapon destroyed three underground tunnels as well as weapons and ammunition, but no civilians were hurt, said an Afghan Defense Ministry spokesman.
A local resident living around two kilometers (1.5 miles) from the blast told CNN he heard an "extremely loud boom that smashed the windows of our house."
"We were all scared and my children and my wife were crying. We thought it had happened right in front of our house," he said.
General John Nicholson, the US Commander for the NATO mission in Afghanistan, defended the use of the bomb and confirmed the target of the strike was the network of tunnels that ISIS uses to move around and protect themselves from Afghan and US forces.
"This was the right weapon against the right target," he said.
He said that the mission's forces had carried out rigorous surveillance before, during and after the operation to ensure there were no civilian deaths.
"Let me be clear -- we will not relent in our mission to fight alongside our Afghan comrades to destroy ISIS K in 2017," he said, referring to ISIS' regional branch.
US President Donald Trump said Thursday the Afghanistan bombing was "another successful job."
The airstrike follows last week's surprise missile strike on a Syrian airfield, in the first US military action against the Syrian regime in the six years of conflict there.
Afghanistan's ambassador to the US, Hamdullah Mohib, said the colossal MOAB was dropped after fighting had intensified over the last week. US and Afghan forces had been unable to advance because ISIS -- which has expanded into Afghanistan in recent years -- had mined the area with explosives.
Locals told CNN that more than 3,000 families had fled the district in the past year or so since the militant group established its presence.
One man, who did not want to give his name for fear of ISIS retaliation, said there were no civilians left in the area the group controlled.
The region the MOAB struck butts up against the porous Pakistan border. The rocky landscape is dotted with caves and defensive tunnels, making it easy to hold and hard to attack, according to CNN International's diplomatic editor Nic Robertson, who has previously reported from the Afghan mountains.
On Twitter, Afghanistan President Ashraf Ghani approved of the strike, saying it was "designed to support the efforts of the Afghan National Security Forces (ANSF) and US forces ... conducting clearance operations in the region."
"Precautions were taken to avoid civilian casualties with this air strike," Ghani said.
Multiple Afghan officials previously told CNN they had no information about the bombing before it happened. A spokesman for the country's Ministry of Defense later said the bombing was carried out "in coordination" with Afghan military forces.
US State Department spokesman Mark Toner said Washington is "working with the government of Afghanistan and our partners in the region in order to deny any terrorist organization -- that includes al Qaeda as well -- a safe haven or any kind of material support on the ground."
Former Afghan President Hamid Karzai however denounced the use of the weapon.
"This is not the war on terror but the inhuman and most brutal misuse of our country as a testing ground for new and dangerous weapons," he said on Twitter.
But Trump's administration has come under increasing pressure over three US-led strikes in the Middle East in the past month that have killed civilians or allies.
On Tuesday, the US-led coalition in Syria killed 18 of its own allies from the Syrian Democratic Forces, in what it described as a misdirected airstrike. The US is also investigating two of its own strikes in Iraq and Syria that Iraqi officials and activists say killed dozens of civilians.
The Afghanistan bombing, along with the intervention in Syria last week, mark a dramatic change in attitude for Trump, who advocated an isolationist, America-first foreign policy during his election campaign.
He once said the invasion of Afghanistan was a mistake, though he later walked back that statement, saying that he "always supported" US involvement in the country.
While the war in Afghanistan has largely slipped from public consciousness in the US, replaced by the conflict in Syria and ongoing tensions over North Korea, there are still around 8,400 US troops in the country engaged in counter terrorism operations.
Those troops are separate to a wider NATO-led effort to train, advise and assist the Afghan army and police force.
Testifying before the Senate Armed Services Committee in February, General John Nicholson warned of a stalemate in the country. He told US lawmakers the current troop level was insufficient and there was a "shortfall of a few thousand" advisers to train the Afghans.
According to CNN national security analyst Peter Bergen, "the war in Afghanistan is at its lowest point for the Afghans and their American allies since the Taliban were overthrown in the months after 9/11."
The Taliban "control or contest" about a third of the population of the country, Bergen said, citing senior US military officials. That's around 10 million people -- more than the population ISIS controlled in Syria and Iraq at the height of its power during the summer of 2014, he added.
First MOAB strike
This is the first time a MOAB has been used in the battlefield, according to the US officials. The munition was developed during the Iraq war and is an air blast-type warhead that explodes before hitting the ground in order to project a massive blast to all sides.
During the final stages of testing in 2003, military officials told CNN that the MOAB was mainly conceived as a weapon employed for "psychological operations."
Military officials said they hoped the MOAB would create such a huge blast that it would rattle Iraqi troops and pressure them into surrendering or not even fighting.
As originally conceived, the MOAB was to be used against large formations of troops and equipment or hardened above-ground bunkers. The target set has also been expanded to include targets buried under softer surfaces, like caves or tunnels.