A police official told Efe news that the suicide attacker was on foot and wore a vest loaded with explosives that he detonated near the policemen watching the demonstration.
Earlier, the police said 11 people, including five police personnel, were killed. The number of fatalities jumped to 20 on Friday.
The Islamic State took responsibility for the attack through its news outlet Amaq. It said a suicide attacker with an explosives vest had targeted "a gathering of Afghan intelligence and police".
Tawab Khan, a resident, said a large number of security personnel had gathered in the area for a crackdown on shopkeepers involved in trading illicit substances.
Several shops and vehicles were also damaged in the area.