Sardar Wali Tabasim, spokesman for the provincial police chief in Paktia province, said another eight officers were wounded in the attack in Gardez city.
He said one of the attackers detonated his suicide vest inside the compound, two others were shot dead by police and one was still fighting.
A doctor at a nearby hospital said more than a dozen wounded civilians had been brought in for treatment. He spoke on condition of anonymity because he was not authorised to brief reporters.
Taliban spokesman Zabihullah Mujahid said in a statement that the group was responsible for the attack.
Al Jazeera’s Rob McBride, reporting from Kabul, said the attack hit a “big target”.
“This is a big police headquarters. It is a big target and the attack seems to have followed a fairly familiar pattern,” he said.
“It seems there was a car bomb at the main gate, which opened a breach into the complex. Four or five attackers managed to then get inside and conduct this attack.”
Source: Al Jazeera and news agencies