BERLIN — German Chancellor Angela Merkel took personal responsibility on Monday for her party’s withering defeat in regional elections in her home state, acknowledging that her stance on refugees drove disaffected voters into the arms of the populist Alternative for Germany (AfD) even as she defended that policy.

Merkel’s Christian Democrats finished third in Sunday's poll in the northeastern state of Mecklenburg-Vorpommern, falling behind the far-right AfD for the first time in one of the party’s worst showings since World War II.

“I am very unhappy with the result,” Merkel said from China, where she attended the G20 meetings over the weekend. “Of course this is connected to the refugee policies. I am the head of the party and chancellor … naturally I am also responsible.”

Nonetheless, Merkel continued to defend her decision to let more than one million refugees into the country last year, insisting that voters would come around if her government can make progress in integrating those granted asylum.

“I still consider the decision as it was made to be the right one and now we need to continue to work on it” — Angela Merkel

“We have to recognize that the population doesn’t have enough confidence in our ability to resolve these issues even though we’ve already achieved a lot,” Merkel said, adding that her priority would now be to “win back trust.”

Even as she took responsibility for the loss, Merkel struck a defiant note, making clear she had no intention of disavowing her refugee policy.

“I still consider the decision as it was made to be the right one and now we need to continue to work on it,” she said.

What worries Merkel loyalists is that the stinging defeat came despite a steep reduction in the numbers of refugees arriving in Germany and the EU’s agreement with Turkey, under which Ankara has pledged to keep migrants from crossing to Greece.

What’s more, Merkel’s government has passed a series of measures in recent months aimed at compelling the newcomers to learn German and take other steps towards integration.

In Mecklenburg-Vorpommern, a sparsely populated rural region where right-wing parties have traditionally performed well, government promises to integrate the mostly Muslim foreigners appeared to have missed the point, however. Even though the state has few Muslims and has taken in only a small number of refugees, many locals — including 96 percent of AfD voters — worry about what they see as the growing influence of Islam, according to exit polls.

The AfD’s anti-migrant, anti-Islam message resonated with voters who, in the words of senior party official Alexander Gauland, are concerned that “they are gradually losing their homeland.”

New voters head Right

The core of the AfD’s support came from voters who didn’t cast a ballot in the last election. The party, which finished with 21 percent, or 180,000 votes total, drew 55,000 such voters.

Most AfD voters were motivated by a desire to voice their frustration with the ruling parties in Berlin, exit polls showed. Even with the party’s surge, the Social Democrat-led coalition with Merkel’s center-right conservatives won enough votes to be able to form a new government, an outcome most political observers believe is likely.

Though Merkel’s Christian Democrats were hit hard by the AfD, all of the established parties suffered losses. The AfD attracted about 22,000 voters from the ranks of the CDU, according to an exit poll commissioned by German public broadcaster ARD. It also stole about 15,000 votes each from the Left party and Social Democrats (SPD).

The Left finished with just over 13 percent, more than five percentage points below its result in the last election in 2011. The region has long been a stronghold for the post-Communists.

“We need to think hard about this and take the consequences,” party leader Bernd Riexinger said.

The ultra far-right National Democratic Party (NPD) lost half of its support or about 20,000 voters to the AfD. The neo-Nazi party missed the five percent threshold necessary to secure seats in the legislature for the first time since 2006.

The Greens, who in the last election benefited from voter dismay over the Fukushima nuclear disaster, also fell short of the five percent threshold, winning just 4.8 percent.

Despite across-the-board losses for the established forces, the broader implications of the election are likely limited.

Mecklenburg-Vorpommern is an outlier in terms of its small size, location and demographics. Many young people have left the state since reunification in search of better economic opportunities elsewhere in Germany. Its population is expected to drop by 14 percent by 2020 from the 1.7 million who lived there in 2002, according to government forecasts.

By comparison, about 18 million people live in North-Rhine Westphalia, Germany’s biggest state, and more than 12 million live in Bavaria. Both of those states are growing.

The exodus and economic stagnation in many areas of Mecklenburg-Vorpommern, political analysts say, has skewed the state’s political landscape towards the extremes.