Media playback is unsupported on your device Media caption French President Nicolas Sarkozy: "The French army is not in Afghanistan to be shot at by Afghan soldiers"

Four French soldiers have been killed in northern Afghanistan after a serviceman from the Afghan National Army opened fire, officials say.

Another 16 French soldiers were injured, some seriously, in the incident in Kapisa province.

An official told the BBC that an Afghan non-commissioned officer got into a "verbal clash" and opened fire.

President Nicolas Sarkozy said France was suspending its training programmes in Afghanistan following the attack.

He was sending his Defence Minister Gerard Longuet to the country immediately, he said.

Analysis President Sarkozy used very tough language to condemn the attack. French soldiers, he said, were in Afghanistan to help their allies. "We cannot accept that a single one of our troops should be killed or wounded by those allies," he said. The president said that Defence Minister Gerard Longuet will on his return from Afghanistan deliver a report on security conditions there for French troops. If these are not satisfactory, he said, then the question of an early withdrawal of French troops from Afghanistan will be on the table. Q&A: Foreign forces in Afghanistan

Mr Sarkozy said that the question of an early French withdrawal from Afghanistan would arise if security conditions were not re-established.

He said it was unacceptable for French troops to be fired on by their allies.

A Taliban spokesman said it was not clear if the attacker was a member of their group but described him as a "conscientious Afghan soldier".

'Murdered'

Thursday's incident, in the Tagab district, took place at 08:00 local time (03:30 GMT), according to French media reports.

"We understand that during a fitness exercise some of our soldiers were suddenly attacked by an Afghan soldier, so they were unarmed," French foreign ministry spokesman Bernard Valero told the BBC.

"They were murdered. It was impossible for them, first of all, to know what was going to happen and secondly to react to this aggression," he added.

The attack brings to 82 the total number of French personnel killed in Afghanistan since 2001.

An Afghan official told the BBC: "This is a tragic incident, a sad and tragic day for us and for Nato." The Afghan soldier was arrested by the French, he said.

Nato confirmed in a statement that four of its personnel had been killed, and that a suspect had been apprehended, but gave no further details.

Afghan President Hamid Karzai released a statement conveying "his deepest condolences and sympathy to the French president, families of the victims and to the French people".

The relationship between the two countries was "historic" and "honest," and a source of happiness, he said. President Karzai is due to meet Mr Sarkozy in Paris next week.

The BBC's Bilal Sarwary in Kabul says there has been an increasing number of incidents involving Afghan soldiers turning their weapons on Nato forces.

The Afghan government has failed to come up with a solution or a strategy to prevent such attacks, he says.

Recent Afghan 'turncoat' attacks 9 January 2012: US soldier killed by Afghan in army uniform

29 December 2011: Two French troops killed by Afghan soldier

29 October: Three Australian troops killed by man in Afghan army uniform

4 August: Nato soldier killed by Afghan in police uniform

16 July: Nato member killed by Afghan army soldier Anatomy of an Afghan 'turncoat' killer

Three weeks ago two members of the French Foreign Legion were shot dead by an Afghan National Army soldier, also in Kapisa province.

Five French soldiers were killed by a suicide bomb while on patrol in the Tagab district of Kapisa in July 2011.

That was the heaviest loss of French life in Afghanistan since 10 soldiers were killed in a Taliban ambush in the Sarobi area, east of Kabul, in August 2008.

2011 was France's bloodiest year in Afghanistan with the loss of 26 personnel. The risks faced by French forces have increased as the areas of the country where they are stationed have become less stable.

'Difficult decision'

French troops have been part of the Nato-led operation in Afghanistan since 2001, and the country currently has 3,600 troops there.

President Sarkozy announced in July that 1,000 troops would be withdrawn from the country by the end of 2012, ahead of full Nato withdrawal from Afghanistan in 2014.

Mr Sarkozy faces re-election this year and the loss of French life in Afghanistan is a highly politically sensitive issue in France.

The socialist challenger for the presidency, Francois Hollande - who is ahead of Mr Sarkozy in opinion polls - has reiterated his position that he would withdraw French troops by the end of the year, if elected.

A senior commander with the Nato-led International Security Assistance Force (Isaf) in Kabul said he was speechless at the prospect of a potential French withdrawal. France is one of the few members of Isaf to have more than 1,000 troops in Afghanistan.

Commenting on the gun attack, Nato Secretary General Anders Fogh Rasmussen said such incidents were relatively rare.

"The reality is that every day, 130,000 Isaf troops from 50 nations fight and train with over 300,000 Afghan soldiers. That takes a lot of trust among a lot of soldiers," he said.

In a separate development, a Nato helicopter has crashed in southern Afghanistan killing six soldiers. The nationalities of those killed has not been disclosed but they are believed to be American.

The Taliban said they killed the soldiers, but an Isaf spokesman said there was no enemy activity in the area at the time.