Image caption France announced it would withdraw troops earlier than planned after the killings

An Afghan soldier who killed five French soldiers in January has been sentenced to death by a military court, officials say.

Abdul Saboor opened fire on French forces during a joint operation in a remote part of Kapisa province. He was overpowered before he could flee.

A few days later, France announced it would speed up its troops withdrawal.

There have been a growing number of cases where Afghan soldiers have killed their Nato colleagues.

At least 26 foreign troops have been killed in 18 incidents this year in the so-called "green-on-blue" killings, which have a damaging effect on morale.

Recruitment flaws

At the time of the shootings, officials said that the Afghan soldier opened fire after a "verbal clash" on 20 January, while Afghan and French troops were hunting down a local Taliban commander.

Four soldiers were killed instantly and a fifth died later of his injuries. Many others were also injured and an intelligence agent told the BBC that Saboor had fired 120 bullets.

Officials say that Saboor has the right to appeal against the sentence. He is believed to be the first Afghan soldier to have been captured and sentenced for shooting dead foreign forces.

But the incident exposed serious flaws in the recruitment process in Afghanistan's army. Shortly after the incident, the BBC's Bilal Sarwary in Kabul saw documents which indicated that Saboor had joined the army twice.

Image caption Shortly after the attack, Saboor's father told the BBC his son had suffered from psychiatric problems

He had deserted and then faked an application to join for a second time. He also had a history of mental health problems, which he covered up when he joined.

His father told our correspondent that he had been admitted to a psychiatric hospital in Kabul.

International forces say that they have tightened up recruitment and introduced biometric tests, among other measures to cut down on "green-on-blue" attacks.

In the latest such incident, three British soldiers were shot dead by a man in an Afghan police uniform in the southern province of Helmand this month.

Even though the Taliban claim some of these attacks, analysts say many are to do with misunderstandings and personal disputes. It is not clear whether the court established the motive of Saboor when he opened fire on French troops.

Violence continues

France is the fifth largest contributor to Nato's force in Afghanistan.

Nato is in the process of handing over combat command to Afghan forces, a process which is expected to be completed by mid-2013. Nato troops will fully withdraw forces in 2014 and then only training units will remain.

In May, US President Barack Obama and his Afghan counterpart, Hamid Karzai, signed a 10-year strategic partnership agreement outlining military and civil ties between the countries after 2014.

But more than 10 years since the US toppled the Taliban regime, violence is continuing unabated in Afghanistan.

According to UN figures, the number of deaths reached a record 3,031 in 2011 - the great majority caused by militants.