At least seven people, including one assailant, were killed and 20 others wounded after two blasts and ensuing gunshots rocked Jalalabad city, capital of eastern Nangarhar province, on Sunday.
Afghan security forces surrounded the area and were still battling the gunmen hours after the initial explosions.
Sohrab Qaderi, a member of the provincial council, told Reuters that at least four militants, armed with rocket-propelled grenades and machine guns, are still fighting the police.
Daesh has claimed responsibility for an attack on a government building in Afghanistan on Sunday, the militant group's Amaq news agency said without providing any evidence.
The assault in the eastern city of Jalalabad was the latest deadly violence to strike Afghanistan as militant groups step up attacks and US-backed Afghan forces intensify air strikes and ground offensives. The battle took place inside a building which houses the state accounts office.
Reframing How The Season Ended For The 76ers
Though the Philadelphia 76ers went away, they went away loudly. We didn't do it, so next year it's definitely our goal.
Earlier, he said there had been two explosions.
At least nine people, including a child, had been killed and 36 wounded, public health officials said.
Dozens of people have been killed in voter registration centres in recent weeks, leading to fears that people could stay away from elections that are seen as a major test of the government's credibility.
Taliban militants and fighters of Islamic State outfit have presence in Nangarhar province, some 120 km east of Kabul.