The attack came under the cover of darkness at 2.45am, when Gurkhas on duty in the operations room of a British army patrol base in Helmand province were cut down by fire from an Afghan comrade.

As he fled, the renegade Afghan soldier targeted others with a rocket-propelled grenade; one British soldier reportedly died in his sleeping quarters.

The men killed – all members of 1st Battalion, Royal Gurkha Rifles – are believed to be a Nepalese and two Britons.

The ferocity of the betrayal would have caught the Gurkha unit off guard. The renegade member of the Afghan army not only killed fellow members of his own joint patrol, but also inflicted collateral damage on one of the central tenets of Nato's involvement in Afghanistan.

The onslaught was the third incident of military treachery in the past two years, coming eight months after an Afghan military policeman killed five British troops. It is unlikely to force any immediate change in the Ministry of Defence's commitment to training Afghan soldiers or routinely carrying out operations together – a key plank in the coalition forces' exit strategy.

But the latest betrayal is likely to severely undermine the trust that has built up between Nato troops and recruits to the expanding Afghan army and will also reinforce latent suspicions.

General Zahir Azimi, of the Afghan defence ministry confirmed that the attack took place inside a combined Isaf [Nato]/Afghan army base when a lone soldier "fired with an RPG on the British troops before escaping from the base".

The base is near the village of Golan Dastak in the Nahr-e-Saraj district of Helmand. The unit moved into the area in April and the MoD website in London carries an upbeat account, posted earlier this month, of their recent achievements.

It declares: "Joint patrols between members of 1st Battalion The Royal Gurkha Rifles (1 RGR) and Afghan national army (ANA) troops have seen the pernicious influence of insurgents in the [nearby] village of Piand Kalay diminish and a new level of normality return for the local people … Joint patrolling with the ANA has helped the Gurkhas better understand the local people and the atmosphere in the area."

Training the Afghan army has increasingly become the main rationale of Nato's presence.

Captain Doug Beattie, of 1st Battalion, Royal Irish Regiment, has spent several years mentoring the Afghan army and said he believed they were making progress.

"They are keen for peace. I have watched them die as they fought alongside us and I have watched as British soldiers died alongside them. I have trusted Afghan soldiers with my life," he said.

But Beattie, who was awarded the Military Cross and has just published a book, Task Force Helmand, said: "We did sometimes have problems with Pasthun soldiers in the ranks who were influenced by their family while their family was under the influence of the insurgency." In joint ANA/Nato compounds, he said, it was standard practice for British soldiers to carry sidearms when they are relaxing and for one soldier always to remain on guard with his rifle.

Others are less trusting. Bob Shepherd, a former SAS soldier who spent a year training Afghan counter-narcotics police, said: "There will always be incidents like this. An Afghan's loyalty is to himself, to his family and to his tribe. A lot of them are not there because of loyalty to the government in Kabul, but because they need to make some money to feed their family.

" There's a lack of trust between the Nato soldiers and their Afghan counterparts, whether they be police or military."

A serving senior NCO was similarly dispirited by the news. "Not only do we have to watch from the front," he said, "but we have to watch from the back as well. A lot of soldiers don't feel comfortable working with the Afghan national army as it is. It's not the first time it's happened, only the last time it was an Afghan policeman that killed five British soldiers.

"It's just going to be a nightmare. You've been out on patrol all day, or fighting a battle, and you come back and you're trying to relax and get some down time and you have got to be watching out for them.

"There was one lot who decided to go and join the Taliban in the middle of the night. They nicked all the equipment and weapons and drove off in a white pickup truck belonging to the Afghan army. They were supposed to be on guard and they left the place when everyone was sleeping and unprotected and ran off with rifles.

"There's probably been about 20 incidents. They quite often have arguments amongst themselves and end up shooting each other or stabbing each other. "You can't trust them. It's a huge problem. A soldier relies on another soldier to back him, to be his right-hand man, to be there for him.

"If it's an Afghan army soldier you cannot be 100% sure. His family may be being held hostage or for whatever reason he may feel to has to murder a British soldier.

"We really won't like working with them now. Soldiers will have to keep their pistol to hand in case a member of the ANA starts shooting, or blows himself up or fires an RPG at them."

But Colonel Richard Kemp, a former commander of British troops in Afghanistan, said it was an isolated incident.

He said: "If you look at the number of our troops who are involved in partnering the Afghan army, around 5,000, almost half of them, and the number of Afghan troops we have trained, around 130,000, it is very much an isolated incident."

He said any tactic aimed at segregating the forces, such as not allowing the Afghans to be armed with ammunition in the same base as British troops or separating the bases, would undermine trust.

"Partnership with the Afghan national army (ANA) is a real cornerstone of our strategy. We have to work through these tragic events. We have to build trust not reduce it. What it does do is underline how difficult it is to achieve.

"It is a long process to build up a reliable Afghan security force. Of course this stuff will undermine public confidence in what is going on in Afghanistan. People already seeing troops coming back in coffins and now this.

"It will have a more detrimental effect here than out there. For the rest of the tour, they will probably find it difficult to trust the Afghans but after that they will just get on with it."

Rogue attacks

2009 November Darren Chant, Matthew Telford and James Major from the Grenadier Guards and Steven Boote and Nicholas Webster-Smith from the Royal Military Police killed by an Afghan policeman at a checkpoint in the Nad-e-Ali district of Helmand province. Six others were wounded.

December A US soldier, Staff Sgt Ronald Spino, was killed and two Italian troops were wounded when an Afghan soldier opened fire on them at a joint Afghan/coalition base in Bala Morghab.

2008 October A US patrol was attacked by an Afghan policeman as it was returning to its base following a meeting with tribal elders in Paktika province. One US soldier was killed when the policeman opened fire and threw a hand grenade at them.

September US troops at a police station in Paktika province were shot at by an Afghan policeman. One US soldier was killed and three injured.

2007 May Two US troops were killed when an Afghan national army soldier fired into their vehicle as it was leaving a Kabul prison which they had been visiting.