The Taliban, which claimed responsibility for the attack, has ramped up its assaults on government forces and officials since launching its spring fighting campaign earlier this month.
While the attacks have grown more frequent in many parts of Afghanistan, today's violence was of note because it took place in in eastern Panjshir province, a normally peaceful area in a valley that was the heart of the anti-Taliban resistance until the US invasion in late 2001.
Taliban spokesman Qari Yousef Ahmadi claimed responsibility for the attack in an email to journalists.
Provincial police chief Qasim Jangalbagh said the insurgents were wearing police uniforms, and that three of the attackers blew themselves up and four were killed by police during the assault. The government complex was empty because of the early hour, Jangalbagh said.
Jangalbagh said a station wagon with 20 kilograms (44 pounds) of explosives that the insurgents were driving did not blow up. He added that one of the seven insurgents managed to flee the scene, but later blew himself up.