Peaceful protests against the Albuquerque, N.M., Police Department's killing of James Boyd broke out into violence late Sunday night. The APD used tear gas and riot tactics to disperse crowds that hurled rocks and stopped traffic.

Demonstrations began in Sunday afternoon along a two-mile stretch between the University of New Mexico and APD headquarters, but as night settled in a smaller crowd refused to disperse despite APD orders.

Reports say there were around 500 protesters involved in the late night incident.

Demonstrators sat down in the street, slowed traffic on Interstate 25, vandalized police property and one climbed a light pole in an attempt to topple it, police said. One man later arrived with an AK-47 assault rifle and told fellow protesters to attack the police but the crowd was able to talk him down.

As the protest grew violent, APD riot police, mounted officers and the Bernalillo County SWAT team arrived on scene. They threw tear gas canisters and arrested around four protesters. Police Chief Gordon Eden Jr. praised his officers for showing a “tremendous amount of restraint.”

The protests were set off by the fatal shooting of Boyd, a mentally ill homeless man, on March 16. The APD called the shooting justified, but a video it released of the incident has opponents saying the cops overstepped their bounds. After a three-hour standoff, police unsuccessfully tried nonlethal means to subdue Boyd before shooting him as he appeared to comply with their orders. Boyd threatened to kill multiple officers and was carrying two knives.

Online hacktivist group Anonymous launched a DDoS attack on two APD websites on Sunday and called for protesters to “occupy the APD HQ and occupy the sites of the Albuquerque Police Department,” a possible spark to the aggressive actions taken by protesters.

See scenes via KRQE below.

Robert Johnston, a photographer on the scene, told KRQE that the entire situation is extremely polarizing for Albuquerqueans. “People are either completely against police or completely for and I would take [a] middle road,” Johnston said. The Boyd shooting, he said, shows the need for "more oversight," but it "doesn’t mean every officer is a thug or killers as some protesters were saying.”

City workers began cleaning up damage and graffiti Monday morning. Some protesters are calling for more demonstrations this week. The APD is gaining support on social media networks, but a poll from last week shows only a third of residents have confidence in the force.

Watch a video of the APD post-protest briefing here.