Afghan National Army soldiers roll up the red carpet after the hand over ceremony of the Parwan Detention Facility from U.S. military control to Afghan authorities in Bagram, outside Kabul, on March 25, 2013. (Anja Niedringhaus/AP)

Days after the Parwan detention center was ceremoniously transferred to Afghan control, its courtroom was full of American bailiffs, American advisers and American attorneys.

The facility itself — renamed the Afghan National Detention Facility — is on one of the country’s most fortified American bases. When an Afghan defense attorney and prosecutor this week began arguing the case of Abdul Shakor, an alleged Taliban commander detained since 2009, all of the available evidence came from American forces.

The detention center has come to symbolize President Hamid Karzai’s increasingly emphatic vows to secure Afghan sovereignty. But while the formal handover transferred all prisoners to Afghan custody, it has hardly produced a stand-alone Afghan justice system to try them. Afghanistan has retained a controversial American practice that will keep about three dozen detainees imprisoned without trial. Even the court’s top judges and attorney say they remain dependent on foreign assistance to operate.

“Without the coalition, there is no way this court can survive,” said one of the court’s top judges, Hayatullah. “Afghan forces cannot even transport the detainees here for their trials.”

As the 2014 withdrawal of most U.S. troops approaches, the court is just one example of several vital but fragile Afghan institutions, including hospitals and the fledgling army, that might struggle or even collapse without American support. If Afghanistan cannot provide social services and good governance, not to mention courts that provide fair trials and keep dangerous militants behind bars, there are real worries here that security could unravel. Already, the Afghan court at Parwan releases more than one in four defendants it tries.

The U.S. military and State Department are rushing to transform the Parwan population, composed of battlefield prisoners captured by U.S. forces and held under international law, into Afghan criminal defendants. More than 3,000 U.S. detainees, some held without trial for years, had already been transferred to Afghan custody before this week’s agreement added a final 700, including 30 to 40 the United States considers “enduring security threats” ineligible for either trial or release.

Karzai’s government had refused to guarantee it would not release the high-threat prisoners, dismissing U.S. concerns that they would return to the battlefield and arguing that there was no provision in Afghan law to hold them without trial. Last week’s agreement came only after the Pentagon agreed to accept what it called “private assurances” from Afghanistan that they would remain in custody, at least until the U.S. combat withdrawal.

Both sides said the agreement, which they declined to release publicly, provided for bilateral “consultation” when they disagreed about a potential release. That is criticized by some Afghan judicial officials and human rights attorneys, who say detention without trial deprives suspects of a fair trial.

“It’s totally anathema to rule of law,” said Tina M. Foster of the nonprofit International Justice Network. “It used to be that the Afghan public was afraid to be sent to (Parwan) because they would never see the light of day. Now, it’s just an Afghan version of the same thing.”

To construct a workable court system for the detainees, the Americans have built a massive judicial complex — complete with appellate and juvenile courts — and supply everything from printer paper to evidence. Here, Hayatullah and his Afghan colleagues are forging their own justice system and will now decide the fate of thousands of suspected insurgents.

“Though we would like to say we are not involved, we are still intertwined,” Lt. Kevin Corrigan, a U.S. legal adviser at the court, said this week.

A delicate relationship

Shakor’s case highlighted the problems of the ongoing transition, as well as an American presence that has sparked a mix of resentment and begrudging acceptance among Afghans.

Shakor was detained in Logar Province in 2009 by U.S. troops whose intelligence led them to believe he was a Taliban commander. But the Americans considered much of that information classified and would not release it to Afghan attorneys and judges.

Instead, they provided only photos of the weapons in the house where Shakor was apprehended — which he claimed belonged to a friend — and a written description of lab tests confirming that explosive material was found on his body. All other physical evidence had been destroyed or discarded, and there were no witnesses. Afghan officials say prospective witnesses regularly refuse to attend court proceedings at a U.S. military base.

The defense attorney, Karimullah Karimi, spoke angrily in the courtroom filled with U.S. officials.

“Why are we trusting the coalition forces’ report and information?” he said. “These reports are not evidence according to Afghan law.”

That has been a common defense in the Afghan trials at Parwan. Since it launched nearly three years ago with a handful of proceedings, the court has grown exponentially to about 250 trials each month.

In some cases, the argument is effective. U.S. and coalition troops on the battlefield have neither the time nor the training to collect evidence that is admissable in court, a senior U.S. administration official said. Much of what goes into their decision to detain suspects stems from intelligence they are unwilling to turn over to the Afghans.

Because of Afghan concerns about the character of U.S. evidence, which typically consists of written reports and photographs, many detainees are acquitted who would have remained in custody under the U.S. detainee review board. About 27 percent of suspects tried here are acquitted.

“The judges often don’t think there is adequate physical evidence,” said Lt. Col. David Cline, a U.S. legal adviser at the court.

Already, the Afghan court has released some detainees who have returned to the insurgency, according to Afghan officials.

“All the physical evidence gathered by the coalition should be used in the court. If we don’t have the evidence, we can’t use it to convict,” Hayatullah said.

Shakor, a thick man with a bushy gray beard, had been held without trial for three years. He was guided last week to the courtroom wearing opaque goggles. When a member of the three-judge panel asked him to stand up and “tell us the whole story,” Shakor rose, his feet and hands still shackled.

“When coalition forces conducted the operation, they took materials from everywhere and they blamed me,” Shakor said. “I’m not a Talib. You can ask anyone.”

His attorney then presented a document signed by dozens of members of Shakor’s district claiming he was innocent.

Moving forward

As always, Hayatullah had to weigh the validity of a popular argument founded on skepticism of NATO forces with the seemingly damning information in the coalition’s report — and he had to do so while a room full of U.S. officials, including his personal adviser, watched.

He and two other judges left the court to deliberate. When they returned, Shakor stood again.

The judges told him that he was found guilty of participating in the insurgency but not attempted murder or murder. That meant Shakor would receive only a three-year sentence, which he had already served while awaiting trial. He would be released, despite the implication in the military report that he had been involved in the manufacture or placement of improvised explosive devices.

The American advisers and attorneys in the room were not surprised. Given the quality of the evidence, the ruling was standard in the Afghan court.

As long as U.S. forces are participating in targeted operations, evidence will continue coming from U.S. troops. The American legal advisory role is expected to continue as well.

It will remain up to Afghan judges to decide how to craft their own rulings in a court where the Western presence far from disappeared when the justice system officially became Afghan-owned.

“The opportunity to hold these trials is all because of the coalition forces,” Hayatullah said. “I told [the head of the prison] — we need to be able to do the same job as the coalition.”

Karen DeYoung in Washington contributed to this report.