An aerial view of Pol-i-Charkhi Prison, Afghanistan’s largest correctional facility. (Photo released by the U.S. Special Inspector General for Afghanistan Reconstruction)

Afghanistan’s Pol-i-Charkhi Prison has had a reputation for brutality virtually since it was first constructed in 1973. The Soviets are believed to have tortured Afghan detainees there, and it was the site of a wild riot in 2006 in which hundreds of prisoners, including al-Qaeda fighters, seized part of the facility.

That was supposed to change after the United States launched a project in 2009, then valued at $26.5 million, to overhaul the prison’s infrastructure, combat radicalization and improve conditions. The U.S. Embassy in Kabul said at the time that the existing conditions at Pol-i-Charkhi “made it impossible to classify and segregate inmates accord to the crime they have committed,” a recipe that put those convicted of petty crimes in with extremists and violent offenders.

Five years later, the project has ended chaotically. The U.S. watchdog on Afghanistan reconstruction said in a report released Tuesday that the largest contract, valued at $20.2 million, was terminated by the State Department after about half of the work was completed — even though $18.5 million was paid. The contractor, Al-Watan Construction Company, is accused of cutting numerous corners, including using wooden trusses on the roof instead of metal ones, not refilling trenches that had been dug and not connecting back-up generators to the prison’s power grid.

“The prison was designed for about 5,000 prisoners, but currently houses about 7,400,” said the watchdog, the Special Inspector General for Afghanistan Reconstruction. “The security advantage of reconfiguring prisoner holding areas into smaller cells — the primary basis for the renovation work — that could contain and separate maximum security and other prisoners has been lost.”

SIGAR said that it generally found the prison physically in good condition. But it released photographs that underscore the poor conditions and the waste of U.S. tax dollars:

Columns at the prison in disrepair. (Photo released by SIGAR)

This photo shows overcrowding at the prison, including inmates sleeping in hallways outside cells. (Photo released by SIGAR)

Overcrowding in maximum-security cell. (SIGAR photo)

Living conditions at the prison. (SIGAR photo)

Shoddy wiring at the prison. (SIGAR photo)

The view from the prison’s courtyard. (SIGAR photo0)

The prison is known for widespread drug use among inmates. Some of them alleged in media reports that guards provided them with drugs in exchange for cash, and U.S. diplomats said in diplomatic cables that former Afghan President Hamid Karzai was believed to have released several drug traffickers from the prisoner as political favors.

The State Department said in a written response to SIGAR included in the report that corruption contributed to the construction problems, and that as a result it ended its dealings with Al-Watan.