The local officials in eastern Nangarhar province confirm that the coordinated attack on Customs Department in Jalalabad city ended with the elimination of the remaining six militants.
A spokesperson for Nangarhar provincial governor Attahullah Khogyani said the encounter between the two groups broke out following a series of explosions in a building housing the state accounts office.
"Around noon a big boom shook our building", Qaisar told AFP from a Jalalabad hospital. There were multiple blasts as they fought off security forces in a gunbattle that lasted much of the day.
"There were eight terrorists who carried out a co-ordinated attack in Jalalabad city, killing ten people", Khogyani said. One attacker is also down. More explosions were heard later coming from inside the building, the official added.
Security forces and attackers are now fighting each other.
ISIS has claimed responsibility for an attack on a government building in Afghanistan on Sunday, the group's Amaq news agency said without providing any evidence.
Dozens of people have been killed in voter registration centres in recent weeks.
However, the Taliban is now taking part in its annual spring offensive and has launched a number of attacks in recent weeks.
Operation Al Khandaq will target U.S. forces and "their intelligence agents" as well as their "internal supporters", a Taliban statement said in late April. Most have been in the capital Kabul.
Kabul has become one of the deadliest places in the country for civilians as security forces struggle to keep the militants at bay following the withdrawal of North Atlantic Treaty Organisation combat forces at the end of 2014.