A march in Phoenix to protest recent police shootings took a chaotic turn late Friday night when police in riot gear used pepper spray on the crowd to prevent them from taking over the I-10 Freeway. 

The march, which began with hundreds of people, was originally not supposed to be near the freeway. However, the crowd, led by organizer Rev. Jarrett Maupin, changed direction over the course of the evening. At around 10 p.m. local time, police in riot gear gathered en masse at 7th Street and Fillmore to prevent protesters from entering the freeway.

At the standoff, police used pepper spray several times in an attempt to disperse the crowd. 

Some of the crowd dispersed at that point, but many remained, leading to a tense standoff. The police meanwhile were shutting down on and off ramps.

After a long standoff, several members of the crowd reportedly began throwing rocks at police. 

Just after 11 p.m. local time, the police declared the march had turned into an unlawful assembly, as they tried to prevent people who had broken off from getting on the freeway.

They used more pepper spray, and even threatened to turn police dogs on the handful of protesters that remained.

It wasn't only protesters who were caught up in the melee.

As of just before midnight local time, the protest finally seemed to be over, although there were still some stragglers.

Residual traffic backup on I-10 was huge, as you can see in the video below.