Three officers in camouflage fatigues divvied up a stack of green, pink and cream-colored folders in the courthouse on this sprawling U.S. Army base outside Baghdad. Each file contained witness statements, charging documents and handwritten appeals in Arabic from security detainees in the custody of U.S. forces.

For more than five hours one day last month, the soldiers -- a British military intelligence officer, a U.S. Army military police officer and a U.S. Marine Corps judge -- presented the details of the cases to one another, debated their merits and then voted whether to recommend that the detainees stay in custody or be set free.

A Sudanese man detained at the Iraqi border in November was recommended for release after the officers determined that he lived in Iraq and was just trying to get home. But a man caught in December with a financial ledger indicating that he might be selling weapons would have to remain at Abu Ghraib prison, one of two facilities in Iraq where U.S. forces hold people they consider security threats.

This review board is one component among several in the process that the military uses to decide whether to keep detainees in custody and how long to hold them. Military lawyers make the initial decisions about whether there is sufficient evidence to hold a suspect, and then cases are passed to the review board. U.S. Army Maj. Gen. Geoffrey D. Miller, deputy commander of detainee operations in Iraq, has final authority over who is released. At each stage, military officials have extraordinary discretion over who stays and who goes.

Now, three weeks after political authority was transferred to an Iraqi interim government, the U.S.-led military occupation has cleared a backlog of cases that started building last fall as insurgent attacks increased. From February through June, the board reviewed more than 8,000 cases and approved releases in nearly a quarter of them.

"There is a process," said Maj. Patricia Harris, Miller's chief of detention operations. "We've taken great steps to reduce the population to that bare bones of bad guys. We're not rounding up people and holding them without a review in place."

Officials have adopted more-rigid standards for keeping people detained, largely because of political pressure arising from the abuse scandal at Abu Ghraib. One of the changes Miller made when he came to Iraq in March was to require the review board to put a written justification in the file for why someone was being kept in detention.

"If we don't have the evidence, we don't hold them, and we've become much more careful about that," said Capt. Keith Petty, an Army lawyer with the 1st Calvary Division's 2nd Brigade. "There were people we detained who aren't a threat. It just makes people more angry, and it doesn't help us out."

For civilians picked up by U.S. forces, the first stop is the detention facility operated by the unit that grabbed them. For the 1st Calvary Division's Black Jack Brigade, that is 29 Palms, a former hunting lodge on the north side of Camp Victory.

At 6:15 one recent morning, Staff Sgt. Jesse Jackson, an Army combat engineer with the 91st Engineer Battalion, brought in five men who been captured outside a home in the west Baghdad suburb of Ghazalia on suspicion of making explosive devices.

Before the suspects were allowed in, guards checked to see that the captors had completed a mandatory packet for each of them, including a standardized form with information on how and where the suspect was detained and two sworn statements from soldiers about the arrest.

After the initial processing, soldiers took the suspects individually to a bank of showers in a covered patio area, where they washed and changed into orange jumpsuits. Each man's clothes and personal items were recorded in a log and placed in a plastic bin marked with the man's detention identification number.

The suspects were fingerprinted and photographed and their retinas were scanned; the resulting data was electronically stored.

A large sign posted in the processing center instructed the detainees to keep their heads bowed at all times and their hands behind their backs.

Sgt. 1st Class Douglas Bawden is the warden of 29 Palms. He closely guards the evidence against detainees so that guards do not know why they were brought in, a rule he put in place after having to process a detainee accused of killing a buddy of his. "It was one of the hardest things I ever did," he said. "I had to smile and shake my head."

Bawden estimated that more than 600 detainees have passed through 29 Palms in recent months. "I don't let these guys call them prisoners, either," he said. "They're detainees because we don't know if they are innocent or not."

Detainees spend an average of 96 hours at first-stop detention centers such as 29 Palms while their cases are reviewed by two military lawyers. While there, they are given a Koran and prayer rug and soldiers' rations. They also receive a thorough medical examination and treatment for conditions such as diabetes or ulcers.

Petty is one of the two military lawyers who review the cases, which must be looked at within 24 hours of capture. His job is to recommend whether a detainee should be sent to Abu Ghraib or freed. "People we sent to Abu Ghraib, we're pretty confident these are bad guys and they should be sent away," he said.

Once detainees arrive at Abu Ghraib, their cases are reviewed by another set of military lawyers.

One of those lawyers, Marine Capt. Chris Gaffney, said he looks for standard probable cause in deciding whether a detainee should be kept behind barbed wire. "We're not making a finding if the person is innocent or guilty," he said. "We're trying to determine if the person is a security threat."

Petty said the process has improved significantly since last year. "During combat operations, it was difficult to focus on anything but combat operation," he said. "But now we've had the opportunity to clear it up."

The next stage of the review process is the three-member board here at Camp Victory.

On the day the board agreed to free the Sudanese man, the trio reviewed 300 cases and recommended that 60 detainees be freed. In the file of each detainee who would remain in custody, the Marine Corps judge, not identified here because of security concerns, scribbled the person's alleged offense: Attacked coalition forces. Possessed explosive materials. Weapons dealer. Financed attacks.

Because the entire process takes as long as it does, some detainees are held without clear cause and others are kept longer than they should be, military authorities acknowledge. As a result, there is a widespread perception among Iraqis that U.S. soldiers pick people up at random and hold them for no reason.

As he waited outside Abu Ghraib recently, Jaber Mansour, 60, a farmer from Diyala province with three relatives inside the prison, voiced a common complaint.

"They arrested them without telling them what they are charged with," Mansour said. "Arresting people without telling them why is a crime by itself. The democracy they brought is just an illusion."