German troops' involvement in a strike that killed Afghan civilians has again galvanized antiwar sentiments weeks before the vote, leaving the government scrambling to defend the mission.

BERLIN — Even if an election was not looming in Germany, the involvement of the nation's military in an airstrike in Afghanistan that left scores dead and wounded would have intensified political debate about the German role in the region.

The fact that Friday's attack, which both U.S. and Afghan authorities say killed some civilians as well as militants, occurred three weeks before Germans go to the polls has magnified its effect -- one commentator likened it to a "political fragmentation bomb." And it has ensured Afghanistan a place at the center of what had been a lackluster campaign.

German Defense Minister Franz Josef Jung tried to damp public anger, saying the airstrike requested by German troops was "urgently called for." "We had evidence that the Taliban had seized the two petrol tankers around six kilometers from the German military base in order to carry out an attack on our soldiers in Kunduz," he said.

But German politicians, who have avoided the issue because of public opposition to the mission, know the airstrike will only reinforce the impression that German soldiers, who were deployed under strict conditions, are no longer just sinking wells, building schools or constructing bridges in Afghanistan. They are waging war.

For years the German government has been trying to convince the public, one of Europe's most pacifist after its experiences in two world wars, that its mission in Afghanistan is necessary. Officials tried to build on the military's groundbreaking involvement in NATO's campaign in Kosovo in 1999, the first time German troops had been used beyond their borders since World War II. Then-Foreign Minister Joschka Fischer of the Green Party offered strong moral arguments to justify the Kosovo intervention by referring to the Soviet military's liberation of the Nazi death camp at Auschwitz.

Since the U.S.-led invasion of Afghanistan in 2001, German politicians have been at pains to call the German mission there a "stabilization effort" rather than a war.

The government has long been caught in a tricky balancing act, trying to convince its own population that the mission serves domestic security while resisting pressure, particularly from the United States and Britain, for the 4,000 German troops in Afghanistan to take more risks and move from the relative safety of the north to the far more precarious south.

The NATO airstrike has made Chancellor Angela Merkel's task even more complex.

Most parties, including Merkel's Christian Democrats, the Greens, the Social Democratic Party and Free Liberals, had been avoiding the sensitive topic. Nonetheless, Merkel, who officially kicked off her party's campaign Sunday, and her main rival, Foreign Minister Frank-Walter Steinmeier of the SPD, both quietly visited Afghanistan in recent weeks, realizing how easily the issue could explode.

One of her major obstacles in dodging the subject had been the Left Party, whose leader, Oskar Lafontaine, has repeatedly referred to the mission as a war that breaches international law. His is the only party in the lower house of parliament to have called for the immediate withdrawal of German troops. The Left Party is campaigning under the slogan "Get out of Afghanistan," knowing that on this topic at least, the majority of Germans -- an estimated two-thirds, according to polls -- are on its side.

Now the other parties probably will be forced to address a topic that has pushed angst over the economic crisis off the top of the agenda.

"We shouldn't try to keep the theme Afghanistan out of the election campaign," warned Eckart von Klaeden, the Christian Democrats' foreign policy expert. "Rather we need to make it much clearer why we're involved."

That has become harder to do as attacks on German troops have increased. A total of 35 German soldiers have been killed in the eight-year campaign, compared with the more than 700 Americans who have been slain.

There was an attempted suicide attack Saturday against German troops near Kunduz. Five soldiers and an interpreter were slightly injured, but any attack these days makes the headlines.

The umbrella group Network for the German Peace Movement has also been more outspoken. On Saturday, it charged that Germany was "responsible for a massacre" for last week's airstrike and warned that it would take legal steps against the commander who gave the orders.

German soldiers in Afghanistan have enjoyed a better reputation than their American or British colleagues, largely because they operated in areas where they did not have to engage in combat. But military observers say that the image of German troops and locals exchanging friendly greetings at the market square evaporated well over two years ago when insurgents began repeatedly firing on the German base in Kunduz.

Germany soldiers have intensified operations in response, but insurgents keep reappearing in areas the troops had cleared, only underlining the sense of futility on the ground and back at home.