The AfD had controversially suggested police may have to shoot at migrants to stop them entering the country
A right-wing nationalist party looks set to have powered into three German state legislatures in elections widely seen as a referendum on Angela Merkel's refugee policy.
The German Chancellor decided last year to open the door to more than a million migrants, many fleeing conflicts in Syria, Iraq and Afghanistan.
But, in what many say is a sign of voters' anger at her stance on refugees, exit polls indicate the three-year-old Alternative for Germany (AfD) has secured more than 14% of the vote in the prosperous state of Baden-Wuerttemberg, nearly 11% in neighbouring Rhineland-Palatinate and a second place in the relatively poor Saxony-Anhalt, with nearly 23%.
The AfD's leader Frauke Petry said: "We are seeing above all in these elections that voters are turning away in large numbers from the big established parties and voting for our party."
She said voters "expect us finally to be the opposition that there hasn't been in the German parliament and some state parliaments".
The AfD had controversially suggested police may have to shoot at migrants to stop them entering the country.
Mrs Merkel's conservative Christian Democratic Union looked set to finish up to 5% behind Green governor Winfried Kretschmann in Baden-Wuerttemberg and Social Democrat governor Malu Dreyer in Rhineland-Palatinate.
Exit polls also predicted the CDU would drop around 10% to its worst-ever result in Baden-Wuerttemberg, with some 27%.
Mrs Merkel's coalition partner, the Social Democrats, was also braced for uncomfortable results, with large losses predicted in both Baden-Wuerttemberg and Saxony-Anhalt.
Other parties are extremely unlikely to share power with the AfD but the party's increased presence will make their own efforts at building coalitions more complicated.
There is unlikely to be any implications for Mrs Merkel's leadership in the short-term, with the next national election due in late 2017.
The forecast results will generate new tensions but she herself has overcome many state-level setbacks in the past and there is no rebellion or long-term successor in sight.
She insisted last year that "we will manage" the challenge of integrating the influx of migrants and still says that all of the EU's 28 countries must work together to solve the crisis.
But, meanwhile, she has ignored demands from some of her more conservative allies for a national cap on the number of refugees.