Gunman kills two German soldiers at Afghan outpost (UPDATE)
Updates death toll (First version was published at 15:25)
A gunman wearing an Afghan army uniform on Friday opened fire on a group of German soldiers in their camp, killing two and wounding seven before the Germans returned fire and shot him dead, dpa reported.
Berlin officials dubbed it a "terrorist attack" on the army's Observation Point North, deep inside territory made unsafe in recent years by the Afghanistan Taliban insurgency.
Germany's defence minister Karl-Theodor zu Guttenberg had slept two nights previously at the outpost so he could get a personal impression of the dangers.
The minister had already flown back to Berlin when the attacker took place.
The German fatalities were a 30-year-old sergeant who died of his wounds at the scene and a second man who succumbed to his injuries several hours later in an army medical ward. Three more of the wounded were in serious condition.
The killing raises Germany's death toll during a 10-year military deployment to Afghanistan to 47, 29 of them in conflict. Polls show a majority of Germans are hostile to the deployment.
Berlin officials had no immediate explanation of how the attacker managed to get inside the camp, home to 500 German soldiers in Baghlan province, but said the camp was undergoing rebuilding, so Afghan soldiers and workers were often inside the compound.
The military headquarters near Berlin said the fire came from "close quarters," seemingly with a submachine gun.
They said the German soldiers had been doing maintenance work. The NATO-led International Security Assistance Force (ISAF) in Kabul said the Germans had been repairing vehicles at the time.
First reports suggested the attacker was a rogue soldier who had not been spotted by the usual security screenings during recruiting.
Zabiullah Mujahid, a Taliban spokesman, said by telephone from an undisclosed location that one Afghan soldier and nine ISAF soldiers were killed in the firefight. He denied that the attacker belonged to the Taliban.
German Foreign Minister Guido Westerwelle called the incident a "treacherous terrorist attack."
OP North, located on a hilltop at Poza-e-Eshan, 70 kilometres south of Kunduz, houses a combined training and guard battalion tasked with training Afghan soldiers to take over security.