A protest over deadly police shootings turned from peaceful into "mayhem", Albuquerque's mayor said late on Sunday, as officers in riot gear clashed with demonstrators.

People are angry over Albuquerque police's involvement in 37 shootings, 23 of them fatal, since 2010. Critics say that is far too many for a department serving a city of about 555,000.

The US 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.

Alexander Siderits, 23, said he was participating in the protest because he was "fed up" with how police treat citizens. "It has reached a boiling point, and people just can't take it anymore," he said.

An Associated Press reporter saw gas canisters being thrown and Albuquerque police and Bernalillo County sheriff's deputies charging at the crowds, which had mostly dispersed by late Sunday.

Mayor Richard Berry said one police officer was injured, and at one point protesters trapped police in a vehicle and tried to break the windows, the Albuquerque Journal reported.

Berry didn't know of any arrests, and multiple messages left for the police department were not immediately returned. Video by KRQE-TV showed people being led away in restraints, but it was unclear if those people were arrested.

The gathering came days after a YouTube video emerged threatening retaliation for a recent deadly police shooting.

The video, which bore the logo of the computer hacking collective Anonymous, warned of a cyberattack on city websites and called for the protest march. Albuquerque police said their site had been breached on Sunday afternoon, and police spokesman Simon Drobik confirmed the disruption was due to a cyberattack.

In the shooting on 16 March that led to the YouTube posting, a homeless man was killed on the east side of Albuquerque. The shooting was captured on video and followed a long standoff. The FBI has opened an investigation into the shooting.

Last week, Albuquerque police fatally shot a man at a public housing complex. Authorities said he shot at officers before they returned fire.