Angela Merkel's CDU suffers German state election setbacks
The party of German Chancellor Angela Merkel has suffered defeats in two of three states holding regional elections, exit polls suggest.
They indicate the Christian Democrats lost support in Baden-Wuerttemberg and Rhineland Palatinate, but remain the largest party in Saxony-Anhalt.
The anti-migrant AfD achieved gains in all three states, exit polls indicate.
The elections were seen as a test of support for Chancellor Merkel's policy of accommodating refugees.
More than a million migrants and refugees entered Germany in 2015.
In the western state of Baden-Wuerttemberg, a former stronghold of the conservative Christian Democrats (CDU), support for the party reached a historic low of about 27%, the exit polls suggest.
They say the Green-led coalition currently in power won the election.
Analysis: Damien McGuinness, BBC News, Berlin
The unprecedented success of the populist AfD shows just how vehemently some German voters disagree with Chancellor Merkel's pro-refugee stance. Many are conservative voters disenchanted with her centrist policies, and swayed by the robust populist narrative offered by AfD.
So is this a blow to Mrs Merkel's leadership? Not necessarily. It was also a historic victory for the Greens, who support the chancellor's position on refugees.
And during the campaign in Baden-Wurttemberg and Saxony-Anhalt the CDU candidates saw their voters fall away as they sporadically tried to undermine the chancellor's message and regain the populist ground from AfD.
Remarkably in those states it was the CDU's left-wing opponents who backed Mrs Merkel's refugee policies most consistently - and tonight reaped the rewards for it. These results are proof that Germany is becoming increasingly polarised between voters who passionately support Mrs Merkel's pro-refugee stance and those angered by it.
In Saxony-Anhalt, a poor, eastern state where the CDU and the Social Democrats govern together, that coalition looks set to remain in office but the exit polls say Alternative Fuer Deutschland (AdF) won about 22% of the vote.
The Social Democrats are set maintain their hold on Rhineland-Palatinate, a state the CDU had hoped to capture.
Already represented in five of Germany's 16 regional parliaments, the AfD has campaigned on slogans such as "Secure the borders" and "Stop the asylum chaos".
German Vice-Chancellor Sigmar Gabriel said on Saturday that gains for the AfD would not change his government's stance on immigration.
He said: "There is a clear position that we stand by: humanity and solidarity. We will not change our position now.
But in Berlin on Saturday, about 2,000 right-wing demonstrators carrying German flags chanted "Merkel must go!" and "We are the people!".
The poor results could put additional pressure on Mrs Merkel, just as she is trying to push through an EU deal with Turkey to reduce the numbers of migrants and refugees entering western Europe.
As Europe's largest economy, Germany has a leading role in policy-making for the European Union.
At a summit earlier this week, the chancellor promoted a last-minute draft of the deal and demanded the support of other European leaders.
Ms Merkel still needs to complete that deal at another summit at the end of this week. If her party performs poorly on Sunday, she will go into that meeting weakened.
The meetings and demonstrations came as thousands of migrants have massed in muddy camps in the Greek border town of Idomeni after countries across the Balkans closed their borders.
- Founded in 2013 by Bernd Lucke, Alexander Gauland and Konrad Adam to oppose German-backed bailouts for poorer southern European countries
- Mr Lucke, seen as a moderate, wanted Germany out of the euro but his colleagues were unhappy that he wanted to focus exclusively on euro-related issues
- He quit the party in early July 2015, arguing it was becoming increasingly xenophobic
- Right-winger Frauke Petry replaced him as party leader
- It became the first anti-euro party to win seats in a German regional parliament, receiving almost 10% of the vote in the eastern German state of Saxony in 2014, and went on to win seats in four other states' parliaments in 2014 and 2015
- The party had seven MEPs elected in the 2014 European elections (including Mr Lucke), but only two remain party members
- AfD was part of the European Conservatives and Reformists Group, like the UK's ruling Conservatives, but its two MEPs look set to be expelled from the group over comments on shooting refugees