BAGRAM AIR BASE, Afghanistan  A sweeping United States military review calls for overhauling the troubled American-run prison here as well as the entire Afghan jail and judicial systems, a reaction to worries that abuses and militant recruiting within the prisons are helping to strengthen the Taliban.

In a further sign of high-level concern over detention practices, Adm. Mike Mullen, the chairman of the Joint Chiefs of Staff, sent a confidential message last week to all of the military service chiefs and senior field commanders asking them to redouble their efforts to alert troops to the importance of treating detainees properly.

The prison at this air base north of Kabul has become an ominous symbol for Afghans  a place where harsh interrogation methods and sleep deprivation were used routinely in its early years, and where two Afghan detainees died in 2002 after being beaten by American soldiers and hung by their arms from the ceiling of isolation cells.

Bagram also became a holding site for terrorism suspects captured outside Afghanistan and Iraq.

But even as treatment at Bagram improved in recent years, conditions worsened in the larger Afghan-run prison network, which houses more than 15,000 detainees at three dozen overcrowded and often violent sites. The country’s deeply flawed judicial system affords prisoners virtually no legal protections, human rights advocates say.