A US military strike with a weapon known as the “mother of all bombs” (MOAB) killed 36 IS militants and destroyed their base, the Afghan defence ministry says.
The 21,600lb (9,800kg) bomb was dropped on a tunnel complex used by so-called Islamic State in Nangarhar province.
No civilians were affected by the explosion, the ministry said.
Former Afghan President Hamid Karzai condemned the attack as “an inhuman and most brutal misuse of our country”.
Chief Executive of Afghanistan Abdullah Abdullah confirmed that the attack had been carried out in co-ordination with the government and that “great care had been taken to avoid civilian harm”.
The Afghan defence ministry said the bomb struck a village area in the Momand valley where IS fighters were using a network of caves.
It said the bomb also destroyed a large stash of weapons.
The GBU-43/B Massive Ordnance Air Blast Bomb is the largest non-nuclear bomb ever used by the US in a conflict.
It was dropped by plane in Achin district on Thursday evening local time, the Pentagon said. It is more than 9m (30 ft) in length.
It was first tested in 2003, but had not been deployed in combat before.
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”.
Nangarhar Provincial Governor Gulab Mangal said IS fighters had used the complex to “kill people and hold important meetings”.