ANNABERG-BUCHHOLZ, Germany >> Taking the stage, Chancellor Angela Merkel thanked the thousands of Germans who had turned out at a recent campaign rally, and then leveled her gaze at a small but noisy knot of right-wing protesters yelling and blowing whistles at the back of the square.
“Some want to listen, but others can only shout,” the chancellor scolded, singling out the protesters from the far-right Alternative for Germany party. “That is what separates us; some want to get things done, others just yell.”
With that, Merkel defused what could have been an ugly challenge at her rally in Annaberg-Buchholz, near the eastern border. As Merkel seeks a fourth term in elections Sept. 24, she has done much the same to what had once seemed like a potent threat from the far right in general.
Barely six months ago, after more than 11 years in power, the chancellor was vulnerable. Her immigration policies were unpopular and had buoyed a far right that was surging across Europe. Merkel herself appeared ambivalent about another run as polls showed voters tiring of her.
No longer. Today, the chancellor’s center-right Christian Democratic Union draws as much as 40 percent support, enough to lead a new coalition. Merkel’s position is so secure, many political observers have already shifted their focus from who will win the election to whom she will choose to form her next government.
Merkel, 63, faces off in her first debate on Sept. 3 against her main challenger, Martin Schulz of the Social Democratic Party. He, too, had once seemed a threat, but has watched Merkel open a long lead.
It was the advance of the far right, however, that seemed most unnerving for the chancellor and her country. Its ebbing has much to do with the German allergy to extremism since the country’s experience with fascism, as well as with the debilitating internal squabbles of the fledgling Alternative for Germany.
But its relative cratering also reflects Merkel’s skills as a political tactician and an often cold-eyed, nonideological policy pragmatist, even as she has sometimes been cast as a liberal idealist.
Not least, she has maneuvered to deflate the issue that had left her most vulnerable — her decision to open German borders to nearly a million asylum seekers in 2015 — and in the process stripped away her far-right opponents’ animating force.
While the Alternative for Germany appears poised to enter parliament for the first time — a potentially historic breakthrough for the far right — the movement has found itself struggling to reach double-digits in the polls. It regularly stages colorful protests at Merkel’s rallies, but runs the risk of making itself a political gadfly rather than the kingmaker it had hoped to be.
“Ever since Ms. Merkel has shifted her policies and allowed fewer refugees into Germany, that issue is no longer helping the Alternative for Germany,” said Oskar Niedermayer, a professor of political science at the Free University of Berlin. “And they are doing everything to damage their own reputation.”
From the start of the migration crisis, while many Germans panicked at the arrival of hundreds of thousands of asylum seekers, she confidently counseled: “We will manage this.” How she managed it was through a series of course corrections.
In spring 2016, Merkel negotiated a European Union deal with President Recep Tayyip Erdogan of Turkey that effectively stanched the refugee flow. Only about 280,000 people arrived in Germany last year, compared with 890,000 in 2015.
The deal drew criticism for betraying the democratic values on which Merkel had argued Germany had to accept the refugees in the first place. But Merkel has since been able to argue that Germany, more than most European countries, has done its share.
In her annual summer news conference in Berlin, Merkel defended her decision, calling it “important and right.” But she also shifted blame to European partners, who have resisted or refused to take in refugees. “It is also right that we must find long-term, sustainable structures,” she said.
Drastically cutting the flow of newcomers has allowed Merkel to shift focus to the work of integrating the asylum seekers already in the country. But she has also put the onus on them to learn German, while taking a harder line on expelling those found to pose a danger or rejected for asylum.
In the past two years, the authorities have regained a grip on who has entered the country, and most refugees have begun language classes, although only 9 percent have found jobs, according to the Federal Employment Agency.
Even the sexual assaults in Cologne on New Year’s Eve 2015 that were blamed on migrants and the attack on Berlin’s Christmas market last year, as well as a string of lesser attacks, have done little to dent Merkel’s standing now that elections are approaching.
Merkel has appealed to Germans’ pragmatism, pointing out that given the number of migrants who came into the country, there were bound to be some criminals.
In Germany’s widely decentralized system, she was also able to point to security deficiencies at the local level. She went on to pledge more police, improved technology and, if necessary, legal changes, to ensure safety.
If anything, many Germans have seemed to gravitate around her as a reassuring presence and steady hand in an uncertain time.
“She has done a wonderful job,” said Marcel Naumann, 21, who works in a chemical factory in Saxony and said he would vote for the chancellor. “She got us out of the crisis and even with her refugee policies, she has remained true to her vision.”
But the Alternative for Germany is by no means a spent force, and it is trying hard to move the immigration issue to the fore again.
In recent weeks, the party has launched a provocative advertising campaign, playing on the perceived threat posed by immigrants and assisted by Harris Media, which is based in Texas and run by Vincent Harris, who briefly served on President Donald Trump’s campaign.
One ad shows a pregnant white woman with the tagline: “New Germans? We’ll make them ourselves.” Another says, “Burkas? We prefer bikinis,” and shows two women dressed accordingly.
The party’s immigration platform focuses on overhauling the country’s asylum laws and using the money Berlin currently spends on processing and integrating refugees to keep them in camps closer to their home countries.
“German interests must be guiding principles and not that whoever happens to be visiting here right now gets some sort of development program,” Alexander Gauland, the party’s leader, recently told reporters.
He later riffed on Trump’s own campaign promise, saying: “It’s not always ‘America First.’ Sometimes it’s ‘Germany First.’”
Yet Trump’s brand of populism is not popular in Germany. Germans have taken the angry divisions in the United States since his election as a caution, watching warily and condemning demonstrations by emboldened far-right extremist groups, including neo-Nazis.
Given their history, Germans have shown little tolerance when the Alternative for Germany has overstepped social and historical boundaries, like when one regional leader, Björn Höcke, questioned the tradition of remembrance and atonement for the country’s Nazi crimes.
This week, Gauland suggested Merkel’s integration minister should be “disposed of” back in her parents’ homeland, Turkey. The chancellor condemned Gauland’s statement as “racist,” and such remarks have turned off many would-be backers.
“Many people do not vote for the Alternative for Germany not because they agree with their positions, but out of protest against the other parties,” noted Hendrik Träger, a political scientist with the University of Leipzig.
In the tumultuous aftermath of the refugee crisis, protest was what many Germans wanted, and last year the Alternative for Germany made record gains in five state elections.
But after a year in which Merkel has tamped down many of Germany’s anxieties, the appeal of a protest vote seems to be waning, he and other analysts noted.
In three regional elections this year — all of them in the west, where voters are less volatile — the chancellor’s party came out on top, including in the country’s most populous state, North Rhine-Westphalia, considered by many to be a bellwether.
Carola Lange, who attended Merkel’s rally in Annaberg-Buchholz, acknowledged that her city of 22,000 has struggled with changing demographics. She now works helping support the roughly 300 refugees who have arrived over the past three years.
The political tensions make her uneasy, and she views politics with increasing skepticism, she said. Nevertheless, she said, the chancellor would get her vote.
“The only alternative for Germany,” Lange said, “is Ms. Merkel.”