There was also deadly violence in the east on Wednesday. A suicide bomber crashed a car into a police bus, killing 14 people and wounding 16, said Zemeri Bashary, a spokesman for the Interior Ministry. Most of the casualties were police officers, he said.
There was no claim of responsibility, but it matched the pattern of Taliban attacks against government workers and security forces.
The bus was traveling to a police academy in Jalalabad city when it was ripped apart in the explosion, Nangarhar province government spokesman Ahmad Zia Abdulzai said.
In the demonstration in Takhar province in the north, protesters fought with police and tried to assault a German military outpost in the city of Taloqan, the provincial capital, 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. 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, wounding two German soldiers and four Afghan guards. The wounded German soldiers 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. Abdul Jabar Taqwa said. He said that no one in his government was informed about the raid and that NATO acted unilaterally. NATO disputed that.
NATO confirmed it killed four people, two of them women.