Back in 2005, the Blair government committed itself to rebuilding Afghanistan's Helmand province, with a vision that went far beyond what proved possible as revealed in the original planning document released to the BBC.

Helmand has proved by a long way to be the Afghan war's bloodiest ground.

It is the poorest province in one of the world's poorest countries. But some in Whitehall thought they could transform it into something closer to Belgium when Britain deployed there in the spring of 2006.

The hope was that not even a shot would be fired with troops home in 2009.

Instead, 323 British servicemen and women have so far been killed in Helmand, 9,500 British troops are still there and the vision has been revised to the development level of Bangladesh, at best, in another 20 years.

FIND OUT MORE John Ware presents Afghanistan: War Without End? on BBC Two, Wednesday 22 June, 2100 BST. Afghanistan: War Without End?

According to Mark Etherington, the planning team leader, they were confronted with a challenge on the ground of "biblical proportions" that bore no relation to what people in Whitehall had in mind.

It is easy to see why. A declassified copy of the Joint UK Plan for Helmand from December 2005, released to the BBC by the Foreign Office reveals:

"The state is largely absent in Helmand, providing little by way of security, infrastructure or public services."

Joint mission

Instead, Helmand's economy was based largely on heroin production - it provided up to half the global supply.

2005 HELMAND PLAN Profound challenges were identified in the report.

The current governor, chief of police and director of education are illiterate. 70% of the population is estimated to be illiterate.

The dominance of opium fuels a growing internal addiction problem and pervades public life through the influence it buys. Many prominent public figures are alleged to be involved in the trade, including those charged with suppressing it. The chief of the counter-narcotics police in Helmand has 20 staff and two ageing vehicles to cover a province three times the size of Wales with a population of more than one million.

The police force is widely thought to undermine the safety of the population rather than secure it. Reform of the police, perceived by the population as untrained, uneducated, unprofessional, drug-taking and corrupt…will require years to compete.

Provincial government in Helmand is dominated by patronage networks, tribal affiliation and alleged links to the narcotics trade. Interlocutors in the provincial capital of Lashkar Gah complain about the corruption of key government officials and the sale of government land for private gain.

The security situation is perceived to have deteriorated over the last six months. The insurgency has been targeting government officials and Coalition forces. There is collusion between insurgents and narcotics traders. Illegally armed groups proliferate, particularly in inaccessible regions. Afghanistan's porous borders with Pakistan and Iran enable relatively unhindered transit through Helmand of insurgents and drug traffickers alike."

As a result, much of the province was controlled by warring drugs gangs and corruption reached practically every part of the administration.

Helmand was to be a joint military-civilian mission to extend the authority of Afghan President Hamid Karzai.

Protected by troops, civilians would build up the economy and the justice and education systems. The idea was to win the hearts and minds of ordinary Afghans away from the Taliban who were setting up their own shadow local administrations.

But after an initial assessment of the task, the planners returned to London in December 2005 and told Whitehall officials that their vision for Helmand was "not achievable in three years".

We were told that "was not an acceptable conclusion," said Minna Jarvenpaa, the governance adviser to the mission and a member of the planning team.

The vision in Whitehall was for levels of governance, growth in the economy and security occurring "without substantial security support from the international community" - a goal that is still a long way from being realised even today.

When the planners said they did not yet know enough about Helmand to put together a workable plan, a senior member of the secret intelligence service (MI6) is reported to have responded: "We know all we need to know".

Intelligence failure

In fact, the Joint UK Plan for Helmand shows precisely the reverse - in particular just how little was known about the complex dynamics of Helmand's tribal, criminal, religious and political factions.

And the military intelligence assessment failed to anticipate the scale or speed of the violent response from Taliban and other anti-British forces.

But the military momentum was unstoppable. Britain was going to Helmand, come what may.

Image caption 323 British servicemen and women have so far been killed in Helmand

Because the mission was about reconstruction, only around 800 soldiers of the 3,300 deployment were "bayonets" - or fighters. The rest were mainly admin and logisticians.

So the mission was to be limited to a central area of Helmand around the capital Lashkar Gar and would slowly build out.

Except, that ambition was derailed almost from the start.

The report had highlighted a deteriorating security situation with attacks on government officials and coalition forces and collusion between insurgents and narcotics traders.

From the moment British troops arrived, Helmand's new governor, Mohammed Daoud, warned that his authority was being undermined by gunmen in the north of the province.

He urged Britain to deal with them by setting up extra bases.

Despite an initial judgment that even one extra base was "unsustainable", the military bowed to political pressure and by late June four additional bases had been established in Now Zad, Musa Qala, Kajaki and Sangin.

Magnets for attack

The summer of 2006 saw the British army engaged in some of its fiercest fighting in half a century. Reconstruction was virtually abandoned. "I was furious," said Minna Jarvenpaa.

Pinned down in a series of "Alamos" across the north of Helmand, British soldiers became magnets for attacks from Taliban, drug gangs and locals - just angry at the presence of foreigners.

Many Afghans were killed, some by air strikes called in by troops to defend themselves stuck in their fixed positions.

The extra bases needed extra helicopters for supplies and casualty evacuation - for which the mission had not been resourced.

The original reconstruction mission had been about building confidence in the Afghan government, whereas what the mission became was counter-terrorism using maximum attrition.

The general responsible for overseeing day-to-day operations in Helmand was Sir Peter Wall, now head of the British army.

Image caption David Cameron (3rd L) visited soldiers at Patrol Base 2 between Lashkar Gah and Gereshk in 2010

When I suggested that the mission had changed dramatically, he insisted that it had not, on the grounds that whether it was reconstruction or setting up extra bases, both were about upholding the authority of Governor Daoud.

Had the army not set up new bases "Afghan governance in Helmand would have collapsed," General Wall said. "You'd have had your Alamos in different parts of Helmand." Other senior offiercers have told me that is just conjecture.

Like General Wall, all the generals involved - including the current Chief of the Defence Staff, General Sir David Richards - have strenuously resisted the notion that setting up extra bases amounted to a change of mission.

Only now is Parliament investigating the Helmand deployment in a series of hearings before the Defence select committee.

'Change of mission'

John Reid, the Defence Secretary who oversaw the planning of the mission, has told the committee's MPs the mission "palpably changed" - and said we need to know why.

The additional bases were set up two weeks after Mr Reid was replaced as Defence Secretary by Des Browne.

Browne said he had no recollection of being consulted.

General Sir Robert Fry, a strong support of the mission's hearts and minds objective, is equally clear that the situation changed.

He told the MPs: "We went there with one mission, one idea, one force structure - which was all about going smaller and getting larger.

"We then take a complete jump out of that and take on something else and that completely dislocates the analysis that had been done about force levels, intelligence and so on."

• 2005 PLAN OBJECTIVES Many of the objectives in the December 2005 plan proved impossible to deliver.

Objective 1.2: Deliver fair and transparent justice: The only existing form of law was summary justice based on Sharia law. Many of those appointed to oversee the new legal processes were corrupt, so people turned their backs on the imposed system, leaving the Taliban to step in and provide their own form of justice.

The only existing form of law was summary justice based on Sharia law. Many of those appointed to oversee the new legal processes were corrupt, so people turned their backs on the imposed system, leaving the Taliban to step in and provide their own form of justice. Objective 3.2.1: Sustainable development of physical infrastructure: While most of the initial British deployment were non-combat troops, intended to help civilians deliver infrastructure improvements, the security climate meant the civilians had limited ability to operate outside Camp Bastion. Asked what was achieved in the early years a senior offical said "not very much".

While most of the initial British deployment were non-combat troops, intended to help civilians deliver infrastructure improvements, the security climate meant the civilians had limited ability to operate outside Camp Bastion. Asked what was achieved in the early years a senior offical said "not very much". Objective 3.4: Education and Skills programmes strengthened and extended: Attempts to recruit and provide a secure teaching environment were undermined by "night letters" - threats delivered under the doors of anyone that the Taliban believed were working for either the Afghan government or the British reconstruction effort.

Attempts to recruit and provide a secure teaching environment were undermined by "night letters" - threats delivered under the doors of anyone that the Taliban believed were working for either the Afghan government or the British reconstruction effort. Objective 4: Make drug production a high risk/low benefit endeavour: Where opium crops were destroyed, farmers often had no access to other means of earning a living. Left penniless, some were readily recruited into local militia to fight the British who had removed their livelihood.

The US general in charge of American forces at the time was Karl Eikenberry. Now US ambassador in Kabul, he told me that the British Government did "not have a comprehensive political military strategy".

"They did not have the proper resources available to them… I don't think it was a full strategy."

As in Iraq, the legacy of Helmand has been the huge gulf between the ambitious "ends" willed by politicians, and the limited "means" of the military to achieve them.

And yet the military, with its "can do" approach, went on to take more and more ground but could not hold it.

It is only thanks to the current American surge that overstretched British troops have been able to refocus on the original reconstruction mission.

The Helmand debacle helps explain why David Cameron believes that the military routinely have overplayed their hand, reflected in his response last month to their protests that defence cuts mean Britain is no longer a full-spectrum power.

"The defence chiefs will always want more," the prime minister told MPs. "I think the relationship between a PM and the defence chiefs should be a robust one."

Translated this means: "I like assertive generals. But I think you ran rings round the last lot of defence ministers and you need to be clear: 'I am the boss'."

John Ware presents Afghanistan: War Without End? on BBC Two, Wednesday 22 June, 2100 BST.