Attahullah Khogyani, the spokesman for the provincial governor, said the attackers killed at least four victims and that at least 20 other people were wounded.
Afghan security forces have struggled to combat the Taliban and ISIS since the U.S. and North Atlantic Treaty Organisation formally concluded their combat role in the country in 2014, shifting to a support and counterterrorism mission.
Qaderi said at least four attackers then stormed into the building with rocket-propelled-grenade launchers and AK-47 assault rifles.
There was no immediate claim of responsibility of today's blasts.
Militants have staged several attacks across Afghanistan this year. "Security forces are in the area chasing and fighting them", he added. That attack, also claimed by Daesh, followed much the same pattern as Sunday's incident.
A public office in eastern Afghanistan came under an armed attack on Sunday, officials said.
Public health officials said that at least 15 people, including a child, had been killed and 42 wounded.
Earlier, he said there had been two explosions.
"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.
There's also been heightened security fears around preparations for the elections in October. Both the Taliban and a local affiliate of the Islamic State (IS) extremist group have carried out numerous attacks in Nangarhar Province.