German Chancellor Angela Merkel's ruling CDU party beaten into third place in regional elections by an anti-immigration and anti-Islam party. (Reuters)

Chancellor Angela Merkel’s Christian Democratic Union suffered an embarrassing drubbing in her own constituency on Sunday, with voters in local parliamentary elections kicking the party into third place while giving a boost to her new nemesis: the anti-migrant Alternative for Germany party.

The official results, released early Monday, underscored the tough road ahead for Merkel as she weighs whether to make a fourth bid to lead Germany in national elections next year. Although her home constituency of Mecklenburg-West Pomerania is one of the least populous German states, the outcome highlighted the extent to which her decision last year to open Germany’s doors to a historic influx of asylum seekers has boosted the populist Alternative for Germany (AfD).

In fact, Sunday’s vote came a year to the day after Merkel announced Germany would keep allowing in migrants who were bottlenecking in Hungary, which sealed its borders last year as the number of asylum seekers soared. Senior members of her own center-right party and its sister party, the Christian Social Union of Bavaria, directly blamed Merkel’s refugee policy for the loss, calling Sunday’s results “a bitter defeat” and “a wake-up call.”

“It takes time for lost trust to be regained,” the CDU’s secretary general, Peter Tauber, said Sunday.

In the vote, the center-left Social Democratic Party came in first with 30.6 percent, followed by the AfD with 20.8 percent. Merkel’s CDU came in third with 19 percent — its worst showing ever in the state.

The outcome echoed the strong results for the AfD in local elections in three German states last March and once again proved that the party, formed in 2013, is emerging as a significant political force. In Mecklenburg-West Pomerania, as they have elsewhere, its candidates zeroed in on public alarm over crime and security in the wake of the migrant influx and played up their own German heritage.

“Merkel herself is responsible for the failure of her party. . . . One can call this the beginning of the end of the CDU,” AfD chairwoman Frauke Petry told reporters on Merkel’s home turf on Sunday.

In the aftermath of the loss, top CDU officials openly blamed Merkel’s refugee policy. Although the number of migrants arriving in Germany has sharply fallen because of border controls in the Balkans and an E.U. deal with Turkey, domestic critics still say the German government is moving too slowly in processing applications and deporting migrants who do not qualify for political asylum.

Bavaria’s finance minister, Markus Söder, a member of the Christian Social Union, said Merkel must do more to crack down on migrants.

“The result must be a wake-up call for the Union,” he told the Bild newspaper. “The mood of the people can no longer be ignored. A change of course is needed in Berlin.”

The SPD has been escalating its criticism of Merkel’s refugee policy, insisting Germany has exhausted the limits of its ability to help. Yet even though it emerged on top on Sunday, the SPD and other parties on the left also lost voters to the AfD — suggesting the AfD has the ability to poach voters from both sides of the political spectrum.

But that was cold comfort for Merkel’s CDU, which is now on the defensive as Germans wait to hear whether she will run next year — a decision she has said she would not make until the spring.

Despite the setback on Sunday, Merkel nevertheless remains in a relatively strong position. The single biggest factor in her favor, analysts say, is the lack of a political rival strong enough to challenge her.

“I don’t think that Merkel is in very big danger,” said Oskar Niedermayer, a political scientist at Free University Berlin. “Her ratings have gone down significantly, but so did the ratings of her possible successors.”

In addition, the AfD may have trouble translating its local wins to national success. Considered political outsiders that mainstream parties are unlikely to work with, the AfD lacks a strong national machine and would probably face a hard time forming a ruling coalition even if it scored big in a national vote.

Speaking to Bild in an interview published on Sunday, Merkel defended her plan to manage the migrant crisis. She said she regretted nothing about her decision last year to keep German doors open to migrants.

“We are a country that puts the dignity of every single human being at the center of things,” she said. “And if you are facing a humanitarian catastrophe like the one in Syria, you have to take a stand.”

Stephanie Kirchner contributed to this report.