Hundreds of protesters, angered by an overnight NATO raid that they believed had killed four civilians, clashed on Wednesday with security forces on the streets of a northern Afghan city. Eleven people died in the fighting, government officials said.

The demonstrators fought with police and tried to assault a German military outpost in the city of Taloqan, the capital of Takhar province, the officials said, adding that some 50 were injured.

The protest was triggered by an overnight NATO raid on the outskirts of the city. The coalition said four insurgents died in the operation and that two others were detained.

Night raids targeting insurgents regularly stir up controversy in Afghanistan, where angry residents often charge the next day that international forces go after the wrong people or mistreat civilians as they search compounds. Success by NATO in reducing civilian casualties and agreements to conduct night raids alongside Afghan forces have not managed to stem the tide of accusations.

Adding to the confusion, it is often difficult to know who is a militant in insurgent-heavy areas, where entire villages are often allied with the Taliban or other groups.

On Wednesday, hundreds of people gathered on the road from Gawmal to Taloqan and carried the four bodies -- two men and two women -- on platforms as they marched into the city. They shouted insults at Afghan President Hamid Karzai and the United States as they pumped their fists in the air.

"Death to Karzai! Death to America!" they yelled. Officials estimated there were about 1,500 demonstrators.

The crowd started looting shops and throwing stones at a small German base in the city. Police were out throughout the city trying to calm the crowd, Taqwa said. Gunfire could be heard in a number of neighborhoods and troops at the German outpost shot off rounds in an attempt to disperse the crowd outside their walls.

The German military said in a statement that the demonstrators threw hand grenades and Molotov cocktails into the base, injuring two German soldiers and four Afghan guards. The German soldiers, one of whom was lightly injured and one somewhat more seriously, were both in stable condition, the military said.

At least 11 protesters were killed in the fighting, and 50 people were wounded -- some of them police officers, said Faiz Mohammad Tawhedi, a spokesman for the Takhar government.

The raid late Tuesday killed two men and two women who were inside a home in an area known as Gawmal, provincial Gov. Abdual Jabar Taqwa said. He said that no one in his government was informed about the raid and that NATO acted unilaterally.

Provincial police chief Gen. Shah Jahan Noori said he had not been informed of the operation and said none of his officers were involved. Army officials could not be reached immediately for comment.

NATO confirmed it killed four people, two of them women, but said all were armed and tried to fire on its troops.

One of the women was armed with an assault rifle and tried to fire on the troops, NATO said. The other woman was armed with a pistol and pointed her gun at the security force as she was trying to escape the compound.

It is rare for women to be part of an insurgent fighting force in Afghanistan, but not unheard of. There have been cases in the past of women fighting with the insurgency, including as suicide bombers.

NATO said the raid was conducted by a "combined Afghan and coalition security force" and an alliance spokesman said that the governor was contacted ahead of the raid.

"It is standard practice in Takhar province to contact the Afghan provincial leadership prior to an operation. In this case, calls were placed to the provincial governor six times prior to the operation," Maj. Michael Johnson said.

"We are aware of the claims of civilian casualties, and are looking into them," Johnson added.

President Hamid Karzai sided with the Afghan officials. He issued a statement condemning the night raid as having killed four members of a family, and said it was not coordinated with Afghan forces.

"Despite repeated warnings that have been issued by President Karzai to top these uncoordinated NATO operations, it seems these types of operations still have not stopped," Karzai's office said in a statement.

He said the Afghan people should protest without turning to violence, but also said that the blame for the protest lies with NATO.

NATO said that the raid targeted a man working with the Islamic Movement of Uzbekistan -- an insurgent group that is powerful in the north. The man was involved in arms trafficking and building explosives, NATO said. The alliance did not say if he was killed or captured.

In the south, meanwhile, a NATO service member died Wednesday in an insurgent attack, the military coalition said. NATO did not provide further details or the service member's nationality.