The top US military commander in Afghanistan says the decision to use a powerful bomb in the country was based purely on tactical considerations.
Gen John Nicholson said the most powerful non-nuclear bomb ever used by the US in combat had been the right weapon to target a suspected Islamic State (IS) base in Nangarhar province.
A 300m (328yds) long network of tunnels and caves was destroyed, he said.
The US coordinated the attack with Afghanistan, Afghan officials said.
About 36 suspected militants were killed, according to Afghan officials, but IS has denied suffering any casualties.
Known as the "mother of all bombs", or MOAB, the device was dropped on Thursday evening by an MC-130 transport plane, falling in Nangarhar's Achin district.
Chief Executive of Afghanistan Abdullah Abdullah said the attack had been carried out in co-ordination with his government and "great care had been taken to avoid civilian harm".
When IS announced the establishment of its Khorasan branch - an old name for Afghanistan and surrounding areas - in January 2015, it was the first time the group had officially spread outside the Arab world.
'Lightning like a thunder storm'
"The enemy had created bunkers, tunnels and extensive mine fields, and this weapon was used to reduce those obstacles so that we could continue our offensive in southern Nangarhar," said Gen Nicholson.
US and Afghan forces at the site saw "no evidence of civilian casualties", he added.
US President Donald Trump called the strike "another successful job".
Local eyewitness Qari Mehrajuddin first saw "lightning like a thunder storm" followed by the roar of an explosion, he was quoted as saying by Reuters news agency.
"I thought there was a bombing just outside my home," he added but, in reality, the blast was around 5km (three miles) away, according to Reuters.
The 21,600lb (9,800kg) bomb also destroyed a large stash of weapons, the Afghan defence ministry says.
IS commander Siddiq Yar was among those killed, presidential spokesman Shah Hussain Murtazawi told the BBC.
IS fighters in the tunnels had "come from Pakistan and were persecuting people in the local area", he added.
Massive blast area - Jonathan Marcus, BBC defence correspondent
The clue is in the ungainly name - the MOAB or GBU-43/B massive ordnance air blast is the US military's most destructive conventional (that is non-nuclear) bomb.
It is a huge weapon and is GPS-guided. It was dropped from a MC-130 aircraft - the US Special Forces variant of the Hercules transport. The weapon is carried on a special cradle inside the aircraft from which it is extracted by a parachute.
Its principal effect is a massive blast over a huge area. It is a larger version of weapons used during the Vietnam War.
The Trump administration's policy towards Afghanistan remains under consideration but the use of this weapon sends a powerful signal that IS is top of the administration's target list wherever its offshoots may be found.
Achin district governor Ismail Shinwary told the BBC that Afghan special forces, with the help of American air support, had begun anti-IS operations in the area 13 days ago.
He said IS targets had been bombed regularly but "last night's bombarding was very powerful... the biggest I have ever seen".
A member of an anti-IS group in the area who gave his name only as Mohammad told the BBC all civilians had left the area since the start of the anti-IS operations.
Achin resident Mir Alam Shinwari told Reuters that IS were "not human beings, they are savages".
"They used to marry our daughters and wives to their fighters, blamed residents for spying, they beheaded, cut [off] hands and did not allow mobile phones that had cameras," he said.