A new report alleges that police tortured some of the 42 suspected members of a drugs cartel killed in a 2015 raid.

Discrepancies plague the official account of a deadly assault last year in which Mexican police allegedly executed 22 members of the cartel.

Federal police officers, backed up by a Black Hawk helicopter, raided a farmhouse, apparently attacking the cartel as they slept, according to a scathing report published by Mexico's National Human Rights Commission (CNDH) on Thursday.

The incident described by the CNDH represents one of the most egregious rights violations by security forces in Mexico's dark decade of drug violence, a menacing mix of murder, cover-ups and ineptitude.

Only one policeman died in the May 22, 2015 fight. The one-sided death toll was one of the highest since President Enrique Pena Nieto took office in 2012 and pledged to end years of violence. Police executed 22 suspected gang members, burned bodies, manipulated the crime scene and tortured survivors, newly revealed details show.

Renato Sales, Mexico's national security commissioner, rejected the charge of executions, saying police responded with legitimate force.

But the 696-page report presents a grim laundry list of apparent malfeasance by the police, who were smarting from a series of painful Jalisco New Generation cartel attacks in the weeks leading up to the incident.

Images in the report show charred cadavers. In others, bodies lie soaked in pools of blood and mud, with spotless assault rifles laid suspiciously beside them.

Various witnesses, including the wives of victims, told investigators they heard police officers bragging about how they had caught the men unawares.

"It was the easiest job we've ever done. We hit them like little birds, asleep in their nests," one police officer was said to have boasted.

Federal police was not the only institution singled out for blame. For example, in three separate cases, the Michoacan state prosecutor's forensic (PGJEM) team was found to have written up two different autopsies for the same person.

"The experts and medical forensic officers of the PGJEM implicated were involved in acts and omissions that affected the legality, honour, transparency, loyalty, impartiality and efficiency [of the investigation]," the report said.