BERLIN -- A nationalist party powered into three German state legislatures in elections Sunday held amid divisions over Chancellor Angela Merkel's liberal approach to the migrant crisis, projections showed. Merkel's conservatives trailed centre-left rivals in two states they had hoped to win.

The elections in the prosperous southwestern state of Baden-Wuerttemberg, neighbouring Rhineland-Palatinate and relatively poor Saxony-Anhalt in the ex-communist east were the first major political test since Germany registered around 1.1 million people as asylum-seekers last year.

The three-year-old Alternative for Germany, or AfD -- which has campaigned against Merkel's open-borders approach -- easily entered all three legislatures, according to projections for ARD television based on exit polls and early counting.

They showed AfD winning more than 14 per cent of the vote in Baden-Wuerttemberg, nearly 11 per cent in Rhineland-Palatinate and nearly 23 per cent in Saxony-Anhalt, where it finished second.

"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," AfD leader Frauke Petry said.

They "expect us finally to be the opposition that there hasn't been in the German parliament and some state parliaments," she added.

There were uncomfortable results both for Merkel's conservative Christian Democratic Union and their partners in the national government, the centre-left Social Democrats.

Merkel's party kept its status as strongest party in Saxony-Anhalt. It had hoped to beat left-leaning Green governor Winfried Kretschmann in Baden-Wuerttemberg, a traditional stronghold that the CDU ran for decades until 2011. It also hoped to oust Social Democrat governor Malu Dreyer from the governor's office in Rhineland-Palatinate.

However, the projections showed the CDU challengers finishing up to 5 percentage points behind the popular incumbents in both states and dropping by more than 10 points to its worst-ever result in Baden-Wuerttemberg, with some 27 per cent. The Social Democrats, meanwhile, suffered large losses in both Baden-Wuerttemberg and Saxony-Anhalt, where they were the junior partners in the outgoing governments.

Other parties won't share power with AfD, but its presence will complicate their coalition-building efforts. In all three states, the results were set to leave the outgoing coalition governments without a majority -- forcing regional leaders into what could be time-consuming negotiations with new, unusual partners.

"No question about it, none of the parties represented in the German parliament has any special reason to be happy in view of these election results," said Michael Grosse-Broemer, the parliamentary chief whip of Merkel's conservatives. There were "good results for a protest party with no substantial competence, the AfD -- that is very annoying."

Germany's next national election is due in late 2017. While Sunday's results will likely generate new tensions, Merkel herself is likely secure: she has put many state-level setbacks behind her in the past, and there's no long-term successor or figurehead for any rebellion in sight.

AfD's strong performance will boost its hopes of entering the national parliament next year, but it remains to be seen how it will perform in the long term. It entered five state legislatures and the European Parliament in its initial guise as a primarily anti-euro party before splitting and then rebounding in the migrant crisis.

Merkel insisted last year that "we will manage" the challenge of integrating migrants. While her government has moved to tighten asylum rules, she still insists on a pan-European solution to the migrant crisis, ignoring demands from some conservative allies for a national cap on the number of refugees.

The CDU may have been hurt by an attempt by their candidates in Baden-Wuerttemberg and Rhineland-Palatinate to put cautious distance between themselves and Merkel's migrant policies, which may simply have created the impression of disunity.

The two last month called for Germany to impose daily refugee quotas -- something Merkel opposes but which neighbouring Austria has since put in place. Separately, Merkel's conservative allies in Bavaria have attacked her approach for months, demanding an annual refugee cap.

Centre-left incumbents Kretschmann and Dreyer at times sounded more enthusiastic about Merkel's refugee policy than their conservative challengers.

"The result hopefully will be that the CDU and (their Bavarian allies) will realize that this permanent quarreling doesn't help them," said Vice Chancellor Sigmar Gabriel, the Social Democrats' leader.