IS militants were battling Afghan security forces in the city of Jalalabad on Monday, after an overnight assault on a prison that led to a mass jailbreak, officials said.
The assault began on Sunday evening when a car bomb detonated at the entrance to the prison.
Numerous other blasts were heard as the IS gunmen opened fire on security guards.
Two Nangarhar province officials said at least five civilians were killed, and around 40 wounded during the attack.
During the ensuing chaos more than 75 prisoners escaped, forcing police to divert manpower to try to recapture them, according to the officials.
IS claimed responsibility for the attack, which came a day after the Afghan intelligence agency said special forces had killed a senior commander of the group near Jalalabad.
Some 130 km east of Kabul, Jalalabad lies on the highway leading to the Khyber Pass and the Pakistani city of Peshawar.
A UN report last month estimated there are around 2,200 IS members in Afghanistan, and that while the group is in territorial retreat and its leadership has been depleted, it remains capable of carrying out high-profile attacks.


Trump extols America, rails at communism in US 250th celebration
Zelenskyy denies Russian capture of key eastern city Kostiantynivka
Keiko Fujimori declared winner of Peru presidential race
Ukrainian rescuers clear rubble as Kyiv mourns 30 killed in Russian attack
Monaco blast suspect is a Ukrainian woman who fled to Germany
Clinical trials begin for two potential Ebola treatments
India issues notice to Telegram, Signal on concerns over usernames, source says
Blast at Damascus cafe kills nine, wounds 20
