UNITED NATIONS/Jalalabad - The US military's largest non-nuclear bomb killed dozens of Islamic State militants as it smashed their mountain hideouts, Afghan officials said Friday, ruling out any civilian casualties despite the weapon's destructive power.

The US military has defended its decision to drop the bomb on IS positions in Afghanistan, describing it as a "tactical" move.

The GBU-43/B Massive Ordnance Air Blast bomb - dubbed the "Mother Of All Bombs" - was unleashed in combat for the first time, hitting IS positions in eastern Nangarhar province on Thursday.

The bombing is expected to further erode IS's capabilities in Afghanistan and sends a warning to the much bigger Taliban group ahead of their annual spring offensive.

"As a result of the bombing, key Daesh (IS) hideouts were destroyed and 36 IS fighters were killed," the Afghan defence ministry said, adding that the bombing was carried out in coordination with local military forces.

IS denied it had suffered any casualties, in a statement on its propaganda agency Amaq.

Thursday's explosion reverberated for miles and engulfed the remote area in towering flames, destroying what officials called a network of underground IS tunnels and caves that had been mined against conventional ground attacks.

A video released by the American military showed a mushroom cloud rising over the rugged terrain. An Afghan militant source told AFP from an undisclosed location that local people had described the ground shaking "like an earthquake", with people being knocked unconscious by the blast.

Another militant source told AFP that 800 to 1,000 IS fighters were believed to be hiding in the area, which borders Pakistan.

"Daesh (IS) fighters are active in this area and have overrun our houses," said Achin resident Khair Mohammad, welcoming the bombardment. "We don't care if our houses are destroyed, we want Daesh to be eliminated." Security experts say IS had built their redoubts close to civilian homes, but the government said thousands of local families had already fled the area in recent months of fighting.

"Precautions were taken to avoid civilian casualties," President Ashraf Ghani said on Twitter, throwing his support behind the bombardment.

But some officials close to him condemned the use of Afghanistan as what they called a testing ground for the weapon, and against a militant group that controls only a tiny sliver of territory and is not considered a huge threat.

"I find the use of the largest non-nuclear bomb, the so called 'mother of all bombs', on our soil reprehensible & counterproductive," Omar Zakhilwal, the Afghan envoy to Pakistan, said on Twitter. "If big bombs were the solution we would be the most secure place on earth today."

But John Nicholson, the top US commander in Afghanistan, insisted it was the "right weapon against the right target".

Some Afghan officials told CNN on Friday that the bomb killed at least 36 militants.

The top US military commander in Afghanistan told reporters at a news conference in Kabul on Friday that the decision to deploy the MOAB was a purely tactical decision."This was the right weapon for the right target," General John Nicholson said.

Earlier, President Doland Trump praised America’s military for firing the bomb in Afghanistan. “We have [an] incredible military. We are very proud of them and this was another very, very successful mission,” Trump said.

Former Afghan president Hamid Karzai however criticised the US over the strike, saying Washington is using the country as a “testing ground” for its new weapons. “I vehemently and in strongest words condemn the dropping of the latest weapon, the largest non-nuclear #bomb, on Afghanistan by US military,” Karzai tweeted.

The US military was questioned Friday on whether the munition was necessary for the particular target. The GPS-guided bomb is capable of destroying an area equivalent to nine city blocks.

"This was the right weapon against the right target," General Nicholson said. "It was the right time to use it tactically against the right target on the battlefield."

The US military previously estimated ISIS had 600 to 800 active fighters in the area, but was unclear whether they had hoped to strike more fighters.

Nicholson gave a vague response to a question by reporters on who exactly ordered or greenlighted the strike, saying only that he enjoyed a certain amount of "latitude" to make decisions in his chain of command. Nicholson also confirmed the strike was carried out in coordination with Afghan officials, and said the mission had conducted rigorous surveillance before, during and after the operation to prevent 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 IS' regional branch. The US bomb was dropped as Washington comes under increased scrutiny over its military actions in the Middle East, including three US-led airstrikes in the past month that are reported to 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, which Iraqi officials and activists in Syria say killed dozens of civilians.

The Afghanistan bombing - along with the first US military strikes against the Syrian regime last week - mark a dramatic change in attitude for Trump, who advocated an isolationist, America-first foreign policy during his election campaign.

In just the last week, Trump has overseen the use of some of the most powerful weaponry in the US arsenal.

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.