BERLIN -- In her two terms as chancellor, Angela Merkel has repeatedly warned of the dangers of far-right extremism, pointing to the lessons of German history as an example for all of Europe, even as far-right political parties in Greece, Hungary and the Netherlands have attracted new supporters.
The far-right parties have capitalized on hard times, austerity and popular anger in those countries, but Germany's prosperity has not kept it immune: far-right extremists mounted protests in Berlin this week against the resettling of 400 refugees from Afghanistan, Serbia and Syria in a former high school.
The planned refugee center has been a flash point for weeks, and not just among extremists. Residents in the center's eastern Berlin neighborhood worry that concentrating so many refugees in one place would make it difficult for them to assimilate. The protests turned violent on Tuesday night, when the police arrested 25 people, among them a skinhead who gave a straight-armed Nazi salute, banned by German law.
As it happened, Ms. Merkel paid a visit the same day to the former Dachau concentration camp near Munich, where she spoke to a group of Holocaust survivors and emphasized the importance of learning from Germany's past.
"How could Germans go so far as to deny people human dignity and the right to live based on their race, religion, their political persuasion or their sexual orientation?" she said in a somber ceremony on the wide plaza where inmates once assembled daily for roll call. "Places such as this warn each one of us to help ensure that such things never happen again."
About 43,000 people applied for asylum in Germany in the first half of 2013, almost double the number from a year earlier. Still, that inflow is far slower than the country experienced in the 1990s, when hundreds of thousands of people from the former Yugoslavia sought shelter in Germany, straining the system and stoking tensions that led to deadly neo-Nazi attacks on asylum seekers.
That climate also gave rise to a neo-Nazi cell that killed nine minority businessmen and a German policewoman between 2000 and 2007. Beate Zschäpe, the sole survivor of the cell, has been on trial in Munich since May.
On Thursday, a parliamentary committee is expected to release the findings of its inquiry into the authorities' failure to uncover the cell until 2011. The country's police and intelligence agencies have already intensified their efforts to crack down on far-right groups, but the report is expected to call for further measures.
Ms. Merkel is campaigning for a third term in office, and with less than five weeks until national elections, she remains the country's most popular politician. But in the numbers game that is German party politics, her center-right Christian Democratic Union may struggle to find a partner to build a government. The latest poll, by the Allensbach Institute, showed the pro-business Free Democratic Party winning just enough seats to carry the current coalition government into another term; other polls indicate that many voters remain undecided.
Still, Ms. Merkel drew criticism when she squeezed the visit to the camp between a campaign rally and a speech in a beer tent. The opposition Greens called her visit "tasteless" and inappropriate, while the Badisches Tagblatt newspaper wrote that "the visit to the concentration camp seems calculated and thereby loses its impact."
"Ms. Merkel is smart enough to say the right things in the right places," said Abba Naor, 85, who spent three years at one of Dachau's satellite work camps. Mr. Naor, who lost most of his family in the Holocaust, traveled from Israel to take part in the ceremony with Ms. Merkel, the first sitting chancellor to visit the camp.
"It's about time for a German chancellor," he said. "Nobody visited here before."
The Nazis established a prison camp in Dachau in 1933, and later developed it into a concentration camp that served as a model for others. Political prisoners and criminals were among the camp's first inmates. About 10,000 Jewish prisoners, along with Sinti and Roma, homosexuals and others were among the more than 200,000 people held in Dachau during its 12 years of existence.
At least 41,500 people were either killed or died of starvation or disease before American soldiers liberated the camp in 1945.
Max Mannheimer, 93, a survivor of the camp and a member of the International Dachau Committee, personally invited the chancellor to visit when he learned that she would be giving a campaign speech at the city's annual beer festival.
"For us, the few remaining survivors, it would be a great honor," Mr. Mannheimer wrote in the invitation. "Given the rise of far-right extremism in our society, your visit would be a strong political signal that this development, especially given Germany's past, cannot be accepted."
Mr. Mannheimer said he did not share the concerns over whether Ms. Merkel's visit was appropriate. He pointed out that former Chancellor Helmut Kohl visited the city of Dachau twice during his 16 years in office without coming to the camp.
"I think it is positive," Mr. Mannheimer said after accompanying the chancellor on a brief tour of the camp's museum. "She came here first, and then she went to the beer tent."
Correction: August 22, 2013, Thursday
This article has been revised to reflect the following correction: An earlier version of a picture caption with this article misidentified the day on which Chancellor Angela Merkel visited the former Dachau concentration camp. It was Tuesday, not Wednesday.world
This article originally appeared in The New York Times.