Australia's elite special forces have ranged far and wide across southern Afghanistan, often carrying out what are called "kill-capture" missions against Taliban targets. If the targets are killed, that's usually an end to it.
If captured, they will be brought to a nondescript building within the sprawling Tarin Kowt multinational base in Oruzgan province, arriving handcuffed, wearing earmuffs and with painted goggles to obscure their vision.They are "bioenrolled" - fingerprinted, photographed and given a retinal scan - and then undergo a medical check. They're told why they have been arrested and asked whether they wish to complain about their treatment.
They are then placed in one of 19 cells, each of which can fit three or four prisoners, and given bottled water and prayer mats. Each cell is painted with an arrow pointing to Mecca. A chart pinned to a wall reminds detainees of the five daily prayer times.
Since August 2010, about 1829 men and one woman have passed through the Australian Defence Force's purpose-built "Initial Screening Area", or ISA as it's known. Run by an affable female officer who can be named only as Major A, it appears clean and orderly, and is periodically visited by the International Committee of the Red Cross and the Afghanistan Independent Human Rights Commission.
Defence Minister Stephen Smith this week trumpeted the strict regime that the ADF follows to ensure humane treatment of all detainees. But behind the scenes, sources have told a different story, painting a picture of detainees sometimes held without evidence, of ISA staff bullied for going too soft on prisoners, and of muddied protocols leading to confused lines of responsibility.
Then there are the claims of abuse of prisoners by Australia's Afghan allies. Smith this week announced that for the second time, Australia is suspending transfers of prisoners to an Afghan facility owing to allegations of mistreatment.
Documents obtained by Fairfax Media under freedom of information (FOI) have also raised questions about whether Australian special forces might be helping to deliver captives into the hands of local strongman and police chief Matiullah Khan, who is widely accused of torture and other abuses.
Things are said to have been particularly bad in the chaotic early days of the ISA, when Australia took over managing Afghan prisoners in Oruzgan from withdrawing Dutch forces in late 2010.
These were the days of the notorious "Weekend at Bernie's" incident - nicknamed after the Hollywood film - in which Australian forces brought in a dead Taliban suspect. The corpse ended up being put in a taxi and driven out of the base amid a stoush over who was responsible for the remains.
Then there was the suspect dubbed "Abdul Kaput", who died in the base's hospital. His son, aged in his mid-teens, turned up at the base gates looking for his father.
According to witnesses, he was handed over to American interrogators for about two hours - a claim denied by the ADF - and then unceremoniously ejected from the base. He never saw his father, who died the same day.
One soldier said the boy was captured some months later and appeared to have turned into a diehard insurgent-in-waiting - a case study in how not to win hearts and minds.
"If he wasn't dangerous the first time, he was sure dangerous the second time," the soldier said.
Around the same time, another prisoner was brought in with a gunshot wound to the stomach. He received surgery at the Tarin Kowt hospital but then spent about two months recuperating in the ISA - though the maximum time for holding a prisoner there is normally 96 hours before a special application must be made.
Fairfax Media has been told the prisoner used to defecate on the bathroom floor because he was in too much pain to squat, and lay on his cell-mat for most of his time there.
The ISA struggled with the numbers of detainees coming in. On October 12, 2010, Chief of Defence Force David Hurley reported to Smith that the investigation of a complaint against the ADF had been "complicated and delayed by the recent large intake of detainees", according to the FOI documents.
After being held at the ISA for a few days at most, suspects are supposed to be passed on to the Afghans or Americans if there is evidence against them that would merit a criminal prosecution. But sources claim suspects were hoovered up in the early period on the flimsiest evidence.
It got to the point where the National Directorate of Security (NDS) in Tarin Kowt - the Afghan intelligence agency to which the ISA passes on "low value" detainees - refused to take any more. The Australians, sources said, used food and cases of Coca-Cola to induce NDS staff to keep taking ADF prisoners.
"They were giving us lectures about evidence," the source said. "We were the cowboys, not the NDS. We were saying, 'We know they're bad guys. You find the evidence'."
In October 2010, one prisoner was brought in with a bloody nose and mouth and bruises to his face. The FOI documents state the special forces said the prisoner had tried to grab a gun from an Australian soldier, and was restrained in self-defence with minimum force. The documents show the investigation dragged on for nearly a year. Fairfax Media has been told special forces told investigators they had photographic evidence from a drone and fingerprint evidence to prove the man was an insurgent, but refused to hand it over for months.
Eventually the ADF Investigative Service wrote to General Hurley to complain about the stonewalling. The evidence was never produced, Fairfax Media understands. By then the "high value" detainee had been transferred to the Parwan jail near Bagram, then run by the US. He was eventually released.
Sometimes in place of evidence, there has been pressure for more robust interrogation. Sources allege that military police who run the ISA were urged to "condition" prisoners for questioning by gagging them, keeping them awake, denying them exercise and disorienting them through sensory deprivation.
"SOTG [Special Operations Task Group] and intelligence pressured us to gag and hood the detainees," one source said. "The [ISA] CO fought that hand over foot, saying if we gag and hood these guys, someone will die."
The ISA also, insiders say, came under intense pressure from officers not to release a young man who was deaf-mute and apparently intellectually disabled. The only word he could speak was "mum". "He clearly wasn't a world class terrorist," a source said.
The Defence Department says it is in the process of responding to all the claims.
The business of taking and keeping prisoners has bedevilled Australia's military brass through the post-September 11 conflicts. In the wake of the attacks on the twin towers in New York, John Howard was quick to invoke the ANZUS treaty.
Australian boots were soon on the ground in Afghanistan, but almost immediately the issue of detainees was a thorn in the side of ADF commanders. Washington and Canberra differed on whether the Geneva conventions on humane treatment of prisoners of war should apply in what was an unorthodox conflict.
George Bush and his advisers labelled the Taliban and al-Qaeda "unlawful combatants" - placing them technically outside the Geneva protocols. Australia took a different view. For Canberra's defence chiefs, the problem was this: if they handed detainees over to the Americans, they were potentially in breach of Australia's interpretation of international law. But if they had nowhere to keep prisoners themselves - which they didn't at the time - then they couldn't fight.
As a secret cabinet brief (which surfaced later under FOI) pointed out: "If there is no means to handle captives, this in turn means that captives cannot be taken . . . If captives cannot be taken then the option of being involved in combat operations is denied."
Canberra's solution was a battlefield rule-of-thumb that avoided Australia ever being the detaining power during those early years in Afghanistan, or through the Iraq conflict of 2003-04.
This was achieved by the simple contrivance of always ensuring an American soldier was present whenever the ADF was party to taking captives. That way, the US could be designated the capturing power and Australia could effectively wash its hands of prisoners.
This produced some absurd results. Sixty-six prisoners rounded up by a posse of Australian SAS troops in Iraq were deemed to have been captured by the sole US army officer on the scene, for example.
The practice came to light through documents elicited under FOI by the Public Interest Advocacy Centre in Sydney in 2011. One international law expert, Professor Andrew Byrnes of the University of New South Wales, labelled the saga a "charade".
The matter of who is the capturing power remains a blurry line in Afghanistan today. A special monitoring team tours the various prisons where ADF captives might end up, to check on their welfare. But this regime only applies where prisoners are classed as "ADF-apprehended".
What happens when captives are taken on joint operations between the ADF and Afghan forces? What happens, in particular, when captives are taken by Australian special forces operating with the crack Afghan police unit, the Provincial Response Company or PRC, under the control of the Oruzgan police commander Matiullah Khan, a one-time feared local warlord?
These disturbing questions arise from another tranche of heavily censored ADF documents that came to light this week - again through the advocacy centre's FOI requests.
The consequences of sometimes arbitrary delineations can be serious. At one point, four suspects captured on the same joint operation between the Afghan army and the Australians were brought in to the ISA.
However, two turned out to be technically Afghan detainees - their log books had been filled out in Pashto. They were in the ISA because of a mix-up. The ISA staff had to stand by while the Afghan army came to collect them.
"[The two prisoners] were dumb and happy when the Australians had them because they knew they would be treated well," a source said.
"Then the ANA turned up . . . and these guys just got the look of death in their eyes. They were shitting themselves. It was typical of the vagaries of the place.
"From an international law point of view, where does the line get drawn? What responsibility legally and morally did we have? It was all very, very, very vague."
As Australia gradually winds down its Afghan deployment, the challenge of walking this tightrope - of working with the security forces of a country that has been at war for decades, where corruption is rife, violent revenge a legitimate pursuit and tribal hatreds commonplace - will only get harder.