At least eight people have been killed in a auto bomb explosion near a provincial government building in Afghanistan's eastern province of Nangarhar.
Security forces are fighting back, he said, adding that six civilians have been killed.
Daesh claimed responsibility for the attack.
The provincial governor's spokesman also added that the security forces managed to rescue at least forty two people, including civilians and government workers.
The militant attack is the latest in a series across Afghanistan this year.
Earlier, an explosion at a mosque in the eastern Afghan province of Khost killed at least 13 people and wounded 31 and the casualty total may rise. That attack, claimed by Islamic State, followed much the same pattern as Sunday's incident.
A public office in eastern Afghanistan came under an armed attack on Sunday, officials said.
Khogyani added that at least three explosions were heard at the start of the attack on the building housing the state accounts office, the first of which was from a auto bomb detonated at the entrance.
"I saw two rickshaw drivers on the ground with their arms blown off", said Khan Mohammad, a local resident who saw the initial blasts and the start of the gun battle.
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. Some areas of the province are a stronghold of the Islamic State group but Taliban fighters are also active there.