Hundreds took to the streets after at least seven people were killed in an accident involving a US military convoy.
Protesters pelted the US-led coalition military vehicles with stones.
A police car was set on fire in one part of the city.
Elsewhere, police posts were attacked and set ablaze.
Police and coalition troops apparently opened fire leading many to run for cover.
Some of the rioters were arrested by armed Afghan policemen.
Several people have died in the violence and many more are wounded.