Lieutenant Commander Howard Leedham, an ex-Royal Navy pilot, led a 25-strong force of specially-recruited Pakistani soldiers raiding Taliban camps, hunting down kidnap victims and detaining suspected al-Qaeda militants.
Eight years after leaving the country, Lt Cdr Leeham has broken his silence to describe a programme he believes offers a model for securing Pakistan's porous borders against the militant threat.
While he was at work in the tribal badlands that border Afghanistan, the US State Department programme was a closely guarded secret - even from US and Pakistani officials. Under a one-year contract, Leedham was granted use of an American fleet of seven helicopters and two fixed-wing planes to conduct anti-terrorist operations in support of local troops from a base in Quetta, capital of the restive province of Baluchistan.
To do it he had to persuade a Pakistani general to allow him to recruit a handful of local Pathan soldiers.
"For a moment in time there was a group of Pathans, there were some Pakistani military officers, there were American mechanics, there was me," he said, referring to the tough mountain tribesmen of north-western Pakistan.
"Did we break a few rules on the way? Yes. But if we didn't, the people who would have got the advantage were the bad guys."
The success of "the 25" as Lt Cdr Leedham's force became known, meant it was first doubled in size and then scaled up into a multi-million dollar American and British training programmes, which were halted only last year after the raid to kill Osama bin Laden.
Lt Cdr Leedham tells his story in a new book, Ask Forgiveness Not Permission.
He had left the British military - after a career as a helicopter pilot for Royal Marine Commando and what he coyly describes as "special forces type operations" - and was working with an executive air service in the US when he was approached to take over a failing State Department programme in Pakistan.
With resources focused on the war in Iraq during 2003, equipping his force was a question of begging, stealing and borrowing what was needed. Ration packs were sourced from US troops in Kabul. Smoke grenades were bartered from a contact at the British High Commission in return for seats on flights to Quetta.
The soldiers he worked with were recruited from the Frontier Corps, a paramilitary outfit with its roots in colonial India. But while the men knew the terrain they lacked commando training.
Lt Cdr Leedham taught the recruits the basics of desert warfare and gave an intense course in helicopter-borne assault techniques. The inspiration for his instructions came from the writings of Lawrence of Arabia.
"These guys really did perform," said Lt Cdr Leedham. "I used a lot of Lawrence doctrine. I know it sounds a bit hokey but I did."
At the time, local newspapers reported mysterious roadblocks on the main road from Pakistan to Kandahar, the spiritual home of the Taliban. They would disappear as soon as word spread, only to reappear elsewhere. Lt Cdr Leedham was briefed on an operation to move on a compound frequented by a "high-profile" suspect. He was never told the target and the plan was apparently vetoed by the US on legal grounds, but the book hints that it was a senior al-Qaeda figure, possibly even Osama bin Laden himself.
Lt Cdr Leedham returned to the US at the end of his one-year contract at the age of 46. Today he lives in London and works in the financial world.
The story will cause unease in Pakistan, where conspiracy theories circulate about secret Western forces running amok and where the US today uses a classified drone programme to hunt militants.
Lt Cdr Leedham said the model he used - small teams of local fighters with tight security protocols that prevent tip-offs to militant leaders - could still be used to hunt terrorists even as Western forces pull out of the region.