Hundreds of protesters blocked traffic, trying to get on freeways and shouting out anti-police slogans. They trapped police in a vehicle and tried to break the windows. Gas canisters were thrown outside police headquarters and Bernalillo County sheriff’s deputies charged at demonstrators to disperse the crowd.

That was the scene in Albuquerque described late Sunday night by news reports. It was unfortunate but characteristic of riots.

What wasn’t so typical was the work of “hacktivists” who reportedly sparked the protests, participating on the other side of the mayhem and teargas.

Protesters are angry over the police’s involvement in 37 shootings, 23 of them fatal, since 2010. They marched the 2 miles from downtown Albuquerque to the University of New Mexico, holding signs protesting the recent shootings, particularly the killing of a homeless man in the foothills of the Sandia Mountains on the east side of Albuquerque. Helmet-camera footage of the incident was posted on YouTube earlier this week and went viral, igniting national and international outrage.

In response, a video, identified with the logo of the computer “hacktivist” group Anonymous, popped up on YouTube threatening to launch a cyberattack on the city’s websites. It also urged residents to “occupy” police headquarters.

Albuquerque Police Department deactivated its Facebook and Twitter accounts — to which the Twitter page of Anonymous Operations, claiming to represent the group, tweeted:

A “distributed denial of service” attack would not affect the city’s Facebook or Twitter accounts. It involves thousands of simultaneous attempts to access a single website, which overloads the server and shuts it down. It’s a technique often used on the Internet to target the systems of corporations.

Albuquerque police said their website was breached early Sunday afternoon and police spokesman Simon Drobik confirmed it was due to a cyberattack. The website was visible again late Sunday afternoon, according to news reports.

The FBI opened an investigation into the fatal shooting of James M. Boyd, the homeless man likely suffering from mental illness, after a standoff on March 16 in Albuquerque.

Then last week, police fatally shot a man outside a public housing complex reportedly after he first fired at officers. The family of the man said he was not armed.

The U.S. Justice Department has been investigating the department for more than a year, looking into complaints of civil rights violations and allegations of excessive use of force.

The 2012 announcement stated in part:

“Through the investigation the department will seek to determine whether APD engages in a pattern or practice of use of excessive force in violation of the constitution and federal law. The investigation will include a comprehensive review of the police department’s policies, training and systems of accountability. The investigation will also examine the police department’s engagement with the community and external oversight of officer-involved shootings and other force incidents.”

Department officials met with Albuquerque Mayor Richard Berry and the police chief, Ray Schultz, who promised full cooperation with the investigation, the statement said.