Forces loyal to Libyan leader Moammar Gaddafi carried out mass executions and tortured suspected regime opponents, amounting to crimes against humanity, while the anti-Gaddafi militias now governing the country carried out war crimes, according to a year-long inquiry by a U.N. commission.

The report, by the Geneva-based U.N. Human Rights Council, provides the most detailed account to date of atrocities committed in Libya during the uprising and subsequent Western-backed military operation there.

The commission also raised the prospect that NATO forces may have inadvertently killed dozens of civilians, citing reports that five airstrikes killed 60 civilians and injured 55 others.

While crediting NATO commanders for taking “extensive precautions to ensure civilians were not killed,” the commission could find no evidence to support NATO claims that the five strikes that resulted in civilian casualties were aimed at command-and-control centers or troops staging areas.

Two airstrikes damaged civilian infrastructure “where no military target could be identified,” the commission found.

“The commission found NATO did not deliberately target civilians in Libya,” according to the 220-page report, which was compiled by a three-member team of international jurists. “On limited occasions, the commission confirmed civilian casualties and found targets that showed no evidence of military utility.”

NATO did not release an official response. A NATO official, speaking on the condition of anonymity, said the alliance had previously acknowledged that it had caused some civilian casualties. “It’s clear we did everything humanly and technically possible to minimize the risk of civilian casualties,” the official said.

According to the report, anti­Gaddafi militias carried out reprisal killings of suspected regime loyalists and mercenaries, as well as the wide-scale torture of detainees.

Serious abuses continue to be carried out by militias aligned with Libya’s new government, the commission found. It said Libyan authorities have failed to provide access to an autopsy report for Gaddafi or any information on the circumstances of the death of his son Mutassim. Both died in the custody of anti-regime forces.

The report’s authors said they would provide a sealed list of the names of suspected perpetrators of crimes to the U.N.’s Office of the High Commissioner for Human Rights.

The U.N. commission, chaired by Philippe Kirsch, a former International Criminal Court judge, places the greatest responsibility for abuses on Gaddafi’s regime, saying it has left a 40-year legacy of impunity for political repression and a dysfunctional justice system.

It “concluded that international crimes, specifically crimes against humanity and war crimes, were committed by Gaddafi’s force in Libya. Acts of murder, enforced disappearance, and torture were perpetrated within the context of a widespread or systematic attack against the civilian population.”

The report includes a litany of alleged crimes sanctioned by Gaddafi’s regime, including the use of lethal fire against unarmed demonstrators and the torture and murder of detainees at numerous government facilities, including a “boy scouts’ camp” used by Gaddafi’s forces as a military camp in Al Qalaa.

The evidence included a videotape of a “purported senior regime figure giving instructions to ‘crush’ demonstrators in Benghazi and a firsthand account of an order from Moammar Gaddafi to suppress demonstration ‘with all means necessary.’ ”

Witnesses also uncovered a mass grave at the site, with the bodies of 34 men and boys, blindfolded and with their hands tied behind their backs.

In another case, Gaddafi loyalists threw hand grenades into a warehouse packed with prisoners; of 157 detainees, only 51 were confirmed to have survived.

The commission said that while the new Libyan government has taken “positive steps” to improve its human rights record, it has done too little to hold perpetrators from within its own ranks accountable for crimes, which include the “wide-scale” torture of detainees and systematic pillaging of towns and individuals suspected of supporting Gaddafi.