The Interior Ministry said the attacker was disguised in a police uniform, a tactic Taliban militants have used in several high-profile attacks.
The Taliban has made a comeback in the last three years after their initial defeat following a U.S. invasion in 2001. Southern Afghanistan is the center of their fight against the government and international military forces, and militants control wide swaths of territory.
The blast, which also damaged the compound, killed 21 policemen and wounded at least 20 others, Himat said. Nine of the wounded were sent to hospitals, while the rest were released after treatment, he said.
A Taliban spokesman, Qari Yousuf Ahmadi, claimed responsibility for the blast in a phone call from an undisclosed location. Ahmadi said the militants will continue to launch bomb attacks on Afghan government officials and foreign troops in the country.
Over the last several years, police have borne the brunt of militant attacks. In 2008, some 868 policemen were killed in insurgent attacks, according to a tally of figures collected by The Associated Press. More than 900 police were killed in 2007.
Kai Eide, the top U.N. official in Afghanistan, said the attack "shows contempt both for human life and for the community's wishes for a just Afghanistan."
"People across Afghanistan want and need better justice and law enforcement, and efforts to train and professionalize the police are aimed at meeting this demand," Eide said in a statement.
There are some 70,000 foreign troops in the country.
President Barack Obama's administration has indicated it is likely to send 30,000 additional troops in hopes of turning the tide of Taliban gains and extending the control of the central government into the far reaches of the country.