Patrol base 3 was a scene of devastation.

The operations room, which had been hit by rocket-propelled grenades was a bloodstained and smouldering ruin. Next to it the briefing room had burned down following the blast; a charred flag of St George, put up during the World Cup, stood blowing in the ashes.

Bullet holes shredded the brown canvas walls of the tent where the next attack, using a machinegun, had taken place. Gurkha soldiers peered in, shaking their heads and patting each other on the back. A female soldier stood silently, her head in her hands.

The treachery came in the early hours, one of the victims still asleep in his bed.

The suspected killer, a 23-year-old soldier in the Afghan Army called Talib Hussein.

The three Gurkhas who died stood no chance. Two - believed to be British nationals - died in the operations room when it came under attack by a rocket-propelled grenade. The lone assailant also opened machinegun fire into a tent where the third, a Nepalese national, was sleeping.

Yesterday's murderous assault on the three men of the Royal Gurkha Rifles regiment at the Nahr-e-Saraj district of Helmand Province sent shockwaves through the military.

It was the second such attack by a trusted Afghan soldier in under a year. Five British soldiers died last November in another part of Helmand, when an Afghan soldier they were training opened fire.

The incident will fuel fears that the key to the West's "exit strategy", gradually handing over security to the Afghans, will be undermined by an "enemy within".

British Prime Minister David Cameron spoke by phone to Afghan President, Hamid Karzai, about what he described as an "appalling" incident. "It needs an immediate and urgent investigation and I've discussed that with President Karzai," he said.

Hussein was regarded by British troops as so reliable he was often picked as an intermediary to settle any disagreements between them and Afghan forces.

He was born in Ghazni province, away from areas of Taleban influence, and has been in the Army for just over a year. Senior officials in the Afghan capital, Kabul, provided references for his security clearance.

Yet, in a claim that could not be verified, the Taleban claimed the renegade soldier had surrendered to them after fleeing the British base and was then taken by them to "a safe place".

The killings came just hours after the first Afghan-led military operation against the Taleban had successfully been completed in the same area. In the course of the action an Afghan soldier was shot and severely wounded in a Taleban ambush as he fought to protect British Gurkhas alongside him.

The operation aimed to clear Yakhchal, a Taleban enclave, in Nahr-e-Saraj. British and Afghan soldiers spoke of their bewilderment about the slaughter that took place just 10 hours after soldiers from the two armies had fought side by side.

Senior officers flew into Patrol Base 3, set in a wilderness of scrubland, in three Chinook helicopters yesterday. Brigadier Richard Felton, the head of Task Force Helmand, Lieutenant Colonel Charlie Herbert, in charge of the "partnering" between British and Afghan forces and Colonel Sheran Shah Kobadi, an Afghan brigade commander, met British, Gurkha and Afghan soldiers. The bond between the soldiers, they told those assembled before them, must not be undermined by one act of treachery.

Hussein had been on guard duty at the base just after 2am and took advantage of the mayhem of the aftermath to vanish. A number of weapons were discovered abandoned.

The killings at Nad-e-Ali last year were said to have been triggered by sexual insults. There is no such suggestion about the latest killings.

Colonel Sheren Shah said: "To people who say that this shows that co-operation between Isaf [International Security Assistance Force] and Afghan forces are not working, I would say they are wrong. Yes, there was blood spilt last night and that was terrible. But blood has also been spilt by Afghan and British troops for each other many times and that blood cannot be wiped away from our memories."

- Independent