At stake in the election is control of the three state governments, as well as their seats in the upper house of the federal Parliament. But beyond the short-term political tussle lies the question of long-term damage to the country’s halting attempts to integrate its newcomers, many of whom were born here but are still viewed as outside society’s mainstream.

Politically, the Christian Democrats have everything to lose, since they already control all three governments. Even if they manage to maintain control, simply losing seats would likely be interpreted as a sign of weakness, as the campaign for the next national elections in 2009 already looms large. Mrs. Merkel hopes to win a large enough share of votes to break up the marriage of convenience with the Social Democrats known as the “grand coalition.”

She struck a more measured tone when she spoke at the rally after Mr. Koch. “Violence in this country, whoever is responsible, is not acceptable,” Mrs. Merkel said. She asked for a discussion “in all calmness” with the Social Democrats.

When the debate first flared up, Mrs. Merkel seemed to steer clear of the controversy. Then a few days later she stepped up to support Mr. Koch. “It cannot be that a minority in this country creates fear in the majority,” she said, leaving wiggle room as to whether she was referring to immigrant youth specifically or to young people generally.

Mrs. Merkel pointed to the high share  43 percent  of violent crimes committed by those under 21, and the fact that close to half of those were by what she called “foreign youths.”

Critics argue that the problem lies in disproportionately disadvantaged backgrounds, and that poor German youths are as likely to commit crimes as poor Turks or Russians. Statistics show that juvenile crime rates fell in 2007 from the prior year, but the debate has been more rhetorical than statistical.

Immigrant groups, Germany’s Jewish community and in particular the rival Social Democrats have called Mr. Koch a populist xenophobe and worse. Peter Struck, parliamentary floor leader for the Social Democrats, went so far as to accuse Mr. Koch of being “glad at heart” that the Munich subway attack had happened, a charge Mr. Koch denied.

Critics say the racial overtones cross the line. A campaign poster in Bavaria showed a still image from a surveillance video of the attack, in which the one attacker in the frame is a black silhouette. The victim’s image is cut out, making him a pure white shape. Where he slumps on the ground are written the words, “So that you are not the next.”