Protesters said two people were killed.
Abd al-Rasul, deputy chief of police for the province, said the riot occurred on Friday in the town of Charkh. He said the violence had subsided.
Abd al-Rasul said townspeople threw stones, broke windows at the police station and fired at the officers.
It was not immediately clear what sparked the riot, or whether there were any injuries or deaths. He said police had responded by only firing into the air.
He said the protesters claimed that two people were killed, however, and police were investigating that claim.
According to Abd al-Rasul, police officers were attacked in a nearby town on Thursday after an earlier ambush attempt had been thwarted.
He said that although two men suspected in those incidents had been arrested, their leader escaped and may have had a role in instigating the riot.
Charkh is about 100km south of Kabul.