A British soldier and Royal Marine have been shot dead by an Afghan army soldier, the Ministry of Defence says.

The gunman also injured a third UK serviceman when he opened fire at the British military HQ in Lashkar Gah in Helmand province, southern Afghanistan.

Nato said he was then shot dead when its soldiers returned fire.

The British soldier was from the Adjutant General's Corps (Staff & Personnel Support). Next of kin of both British servicemen have been told.

'Tragic event'

A total of 407 British troops have been killed in Afghanistan since military operations began in 2001.

In a separate incident, an International Security Assistance Force soldier has been shot dead by an "alleged member" of the Afghan police in eastern Afghanistan.

Announcing the two UK deaths in a statement to the Commons, Defence Secretary Phillip Hammond said: "Our thoughts, as ever, are with their families, for whom this will be a deeply personal tragedy.

"Details of the incident are still emerging but it appears that a member of the Afghan National Army opened fire at the entrance gate to the British headquarters in Lashkar Gar city, killing the two British service personnel.

"The assailant was killed by return fire."

Analysis No doubt that Britain and Nato's leadership will want to reaffirm that after this latest incident there will not be a change in policy. But a recent classified coalition report, obtained by the New York Times, found that between May 2007 and May 2011 at least 58 western service personnel were killed by Afghan soldiers and police in 26 separate attacks. The report stated that "lethal altercations are clearly not rare or isolated; they reflect a rapidly growing homicide threat". Could this impact the timetable for withdrawal? When four French soldiers were killed by an Afghan soldier in January, President Sarkozy temporarily suspended his nation's military training mission. He has also now brought forward the date when French combat soldiers will leave the country - from 2014 to 2013.

Shadow defence secretary Jim Murphy said the victims were in the "thoughts of all of us".

Spokesman for the UK's Task Force Helmand, Maj Ian Lawrence, said: "The thoughts and condolences of everyone serving in the Task Force are with their families and friends."

Brig Gen Sherin Shah of the Afghan National Army said the attack, carried out by a member of the Fourth Kandak of 3-215 Brigade, was "a tragic event".

"The incident is still under investigation and it is unclear if the action was planned or influenced by the enemy or if he acted alone, either way it is with the deepest regret that two Isaf soldiers who came to our country to provide security are now dead," he said.

"I would like to convey my deepest condolences to the soldiers' families and the British Army and Royal Marines, especially Task Force Helmand, for their loss."

Earlier a spokesman for the governor of Helmand said the shooting followed a "verbal clash" between Afghan and Nato soldiers, and the Afghan involved was from Kunar province.

The Taliban have claimed that the gunman was "their man".

Tensions

The attack appears to be the latest in a number of "green on blue" incidents - where members of the Afghan security forces turn their weapons on their international colleagues or trainers.

Fifteen Nato military personnel, including eight Americans, have now been killed in such attacks so far this year.

The number of incidents peaked after the burning of Korans by US troops at base in February, which President Obama said was a "genuine mistake".

Tensions were further inflamed by the killing of 17 Afghan civilians, including nine children on 11 March by US Staff Sgt Robert Bales, 38, in their homes in Kandahar province.

Last month, a leaked Nato report said the shootings were a "systematic" problem, detailing widespread collaboration between the insurgents and Afghan police and military.

In the Commons, Mr Murphy questioned the procedures for vetting recruits to the Afghan security forces in light of the incidents.

Armed Forces Minister Nick Harvey said "force protection" was kept under review, adding procedures had been changed in light of events.

The decision to partner UK troops with Afghan forces involved "a considerable degree of risk," he said.

But he added: "This is a risk that the last government was right to compute that it is worth taking and it's the only way, frankly, we are going to ingrain the necessary skills and culture into the Afghan forces and complete our mentoring task."