Two British soldiers have been killed in the south of Afghanistan after an Afghan soldier opened fire on them.

Details are still emerging but the defence secretary, Philip Hammond, confirmed the deaths to the Commons. An Afghan police official said the shooting took place at the gates of a Nato base in Lashkar Gah, the provincial capital of Helmand.

An Afghan army truck approached the base and was reportedly refused entry by the guards, saying it was not authorised to bring weapons inside.The official said one of the Afghan soldiers then rushed through the gate and opened fire on those inside, killing the two soldiers before being shot and killed himself.

The incident comes as part of a growing trend of Afghan security forces targeting Nato troops. The past year has seen a number of similar incidents motivated by personal disputes or insurgent infiltration.

Tensions have been running high in the country in the past month after the burning of Qur'ans by US forces inside an international base resulted in a week of violent protests. This was closely followed by the alleged murder of 16 Afghan civilians by a US soldier in Kandahar province.

Prior to both incidents, Afghans' patience with the decade-long international presence in their country had already worn thin.

"Today's act is a result of the foreigners' behaviour and activities," said Sardar Mohammad Khan, a teacher in Lashkar Gah. "Everyone is frustrated – the army, the police, normal Afghans. On one side we are frustrated with our own government, the corruption, the insurgency, and the return of the Taliban. On the other side, when the foreigners are doing such things it makes you even more frustrated."

The issue poses a sizeable threat to the international military alliance in Afghanistan. One military report into casualties at the hands of Afghan army and police between May 2007 and May 2011 found they were responsible for 6% of coalition casualties during that time period.

In January, France temporarily suspended its combat operations and threatened a premature withdrawal after someone in an Afghan military uniform killed four French soldiers.

Maintaining foreign support remains vital for the Afghan military, which will require an estimated $6bn (£3.7bn) to continue operating after foreign troops leave in 2014.

"These kinds of attacks have increased lately and maybe they will continue to increase in the future," said Massoud Khan Nourzai, a member of parliament from Helmand.

"They have increased because of the incidents like the one in Kandahar. If an incident like Kandahar happens, people are not sitting quietly. In every Afghan family they are talking about it and saying they committed a cruel action."

Nourzai adds that in the past two years many of his own relatives have stopped working with the government and joined forces with the Taliban primarily because of their frustration with the continuing presence of foreign forces.

Following the shooting in Kandahar, American officials have sought to appease Afghans by providing assistance to the families of the victims. Families reportedly received $50,000 for each person killed and $11,000 for those who were wounded.

However, it is increasingly apparent relations between the west and Afghanistan will require more than a financial settlement.

"It doesn't make up for what we lost. Money is money," said Gul Marjan, a resident of Kabul's Sarobi district, whose family received a $1,000 payment after his brother lost his leg during a Nato raid. "The big thing is that my brother lost his leg and our neighbours lost their family members. You can't buy a leg."