Earlier, it was reported that 11 policemen had been killed in the bombing.
The attack took place on Tuesday in Logar province, east of the capital Kabul, according to provincial spokesman Din Mohammad Darwesh.
He said that the attack was carried out by four suicide bombers, who managed to enter the compound wearing police uniforms and using a police vehicle.
No group immediately claimed responsibility for the bombing, but the Taliban has been blamed for similar attacks in the past.
At least six police officers were killed and eight more were injured in two separate assaults in southern Afghanistan earlier this month.
The surge in Taliban attacks has increased significantly since the withdrawal of US and NATO troops from Afghanistan in late 2014.