He shot one dead in his sleeping quarters and killed the other two in the base's command centre using a shoulder-mounted rocket-propelled grenade launcher, sources said.

The Ministry of Defence described it as a "suspected premeditated attack".

A manhunt is under way after the killer fled following the carnage at the joint patrol base near Helmand's provincial capital, Lashkar Gah, at about 2am local time.

Analysts said the Afghan soldier could have been a Taliban "sleeper" or may have been radicalised by insurgents after completing his training.

Afghan president Hamid Karzai sent a letter of condolence to Britain offering his apologies for the incident, which came as a blow to the Nato mission to build up Afghanistan's police and army.

This is the second time members of Afghanistan's security forces have turned on UK troops with tragic results. Five British soldiers were killed and six injured when an Afghan policeman opened fire on them at a secure checkpoint in Nad-e-Ali in Helmand in November.

In a separate incident in Sangin district on Tuesday, a British Royal Marine was shot dead while on foot patrol.

The marine from 40 Commando Royal Marines was serving as part of Combined Force Sangin.