The young man reluctantly proffered his eyeballs and fingertips to an American soldier wielding a hi-tech box resembling an outsize digital camera.
As the machine slowly gathered his biometric details, the man looked increasingly ill at ease. Was it because his herd of goats had started to wander off? Or because the device was revealing that he was in some way mixed up with the insurgency?
With each iris and fingertip scanned, the device gave the operator a steadily rising percentage chance that the goat herder was on an electronic "watch list" of suspects. Although it never reached 100%, it was enough for the man to be taken to the nearest US outpost for interrogation.
Since the Guardian witnessed that incident, which occurred near the southern city of Kandahar earlier this year, US soldiers have been dramatically increasing the vast database of biometric information collected from Afghans living in the most wartorn parts of southern and eastern Afghanistan.
The US army now has information on 800,000 people, while another database developed by the country's interior ministry has records on 250,000 people.
It is the sort of operation that would horrify civil liberties campaigners in the west, but there has been little public debate in Afghanistan. Kitted out with handheld devices that contain a camera to scan eyes and an electronic pad to take fingerprints, US soldiers have been collecting huge amounts of biometric data, with little oversight from the Afghan government.
The US hopes that Hamid Karzai, the Afghan president, can be persuaded to set up a much more ambitious national biometric ID system that would hold information on every Afghan citizen from the age of 16.
Although such a move would potentially be bad news for people's privacy, it would unquestionably make life harder for insurgents.
SCROLL TO CONTINUE WITH CONTENT
Get our best delivered to your inbox.
"It allows us to understand population shifts and movements, who wasn't there before and who might be a potential threat just because they are new to that area," said Craig Osborne, the colonel in charge of Task Force Biometrics.
Already the technology, which was originally introduced in US bases in the Balkans in the early 2000s, is helping to catch dozens of wanted suspects a week. Information collected in the field is checked against a central database containing hundreds of thousands of fingerprints found by US army forensics labs on materials touched by insurgents: weapons, sticky tape from homemade bombs, and even receipts for wire transfers of money used to pay for the rebel cause.
Hundreds of suspects have been identified and detained through such methods, according to data released by the US military last month.
The biometric survey is seen as an essential tool for implementing one of the key principles of counterinsurgency theory: that the population needs to be separated from insurgents.
In Vietnam, the Americans tried a physical separation by herding villagers into "strategic hamlets" where they were fenced off from the Viet Cong. Today's hi-tech biometric approach was used extensively in Iraq to keep insurgents out of sealed off neighbourhoods in Baghdad.
The strategy will be all the more effective if the Afghan government goes ahead with plans to introduce biometric ID cards for the entire adult population by 2013, which could also potentially help fight the rampant electoral fraud that flourished in the last two elections. Fraud has been possible largely due to the lack of a proper electoral roll or census and a reliance on easily forged, or fraudulently acquired, voting cards.
The ministry of interior is already working on the project and the Americans have started a programme where 1,000 student volunteers have collected biometric information citizens. They hope to have issued 1.7m cards by next May.