Beatings, electric shocks and other forms of torture were administered to suspected Taliban fighters in some Afghan-run detention centers, the U.N. said Monday, even as the U.S. and others have spent billions of dollars training the police and security services.

The abuse was not the result of Afghan government policy, but of individual actions that were mostly ignored by the security services, according to the 74-page U.N. report.

Although Afghan security officials have long been suspected of torturing detainees to elicit information and confessions, the report for the first time confirms the practice and outlines much of the abuse.

It found that detainees in 47 facilities in 24 provinces run by the Afghan National Police and the Directorate of Security suffered interrogation techniques that constituted torture under both international and Afghan law.

The NATO-led international military coalition announced last month that it had stopped transferring detainees to 16 of the facilities. NATO was taking action to help fix the problem before resuming the transfers, the report said.

International organizations and governments have spent years trying to bring good governance and rule of law to Afghanistan, a goal that has taken added significance following a decision to hand over security responsibilities to the Afghan government by the end of 2014 _ when all foreign combat troops are to leave the country.

According to the U.N. report, the torture allegations could under U.S. law endanger American funding to some of security services. The U.S. provides the overwhelming majority of the cash currently flowing into training and mentoring programs.

It said the torture allegations "could also trigger application" of a 1997 law that bars the U.S. government from providing funding, weapons or training to any unit of the security forces of a country if the U.S. secretary of state determines there is credible evidence that it "has committed gross human rights violations."

The law would not be applied, however, if the U.S. determined that action was being taken to solve the problem.

One such step, it said, would include bringing to justice "those officials responsible for torture and ill-treatment."

The U.N. said Afghan security ministries cooperated with the investigation and have taken measures to stop the abuse after being shown the report. They have opened investigations, reassigned personnel and have indicated that those responsible will be suspended from their positions and in serious cases, prosecuted.

Drafted by the U.N.'s Afghan mission, known as UNAMA, the report was based on interviews with 379 detainees from October 2010 to August 2011.

Most of the detainees were "suspected of being Taliban fighters, suicide attack facilitators, producers of improvised explosive devices, and others implicated in crimes associated with the armed conflict in Afghanistan."

Torture methods included suspending people by their wrists, beating the soles of the feet, electric shocks, twisting detainees' genitals and removing toe nails.

UNAMA said the torture aimed to obtain information and confessions, which it said are often the sole form of evidence submitted in Afghan criminal trials. Judges often find such confessions "both persuasive and conclusive of the defendant's guilt."

"UNAMA's findings indicate that mistreatment is not an institutional or government policy," said Staffan de Mistura, the Special Representative of the Secretary-General for Afghanistan.

He added that Afghan government cooperation "suggests that reform is both possible and desired as does the government's announced remedial actions to end these abusive practices."

The European Union also said it welcomed the Afghan government's commitment to stop abuse.

"The EU reiterates that all concerned parties must respect and guarantee the fundamental rights of all detainees, to eradicate all forms of torture and ill-treatment, to bring those responsible for such acts to justice and to adhere to and comply with the relevant international norms and standards," said Vygaudas Usackas, the head of the EU's delegation and its special representative to Afghanistan.

Meanwhile, the Ministry of Interior said five Afghan civilians died in twin explosions Monday in the Dangam district of Kunar province in eastern Afghanistan.

A civilian vehicle struck a roadside bomb, shortly followed by another blast that hit passers-by running to the scene to help. Four people were killed and two wounded, the ministry said.

NATO also said one of its service members died in southern Afghanistan. It said an investigation was launched into the death to determine the circumstances. It provided no further details.

Seven NATO members have died in Afghanistan in October, and 461 since the start of the year.