Germany's far-right AfD party surged to new strengths in elections for two eastern states on Sunday, exit polls said, reflecting anger over Chancellor Angela Merkel's migrant policy and a wealth gap 30 years after the Berlin Wall fell.

The Alternative for Germany became the second-strongest party in regional parliaments in both Saxony and Brandenburg, the state which surrounds the capital Berlin, according to the public television exit polls.

In Saxony, where the radical anti-Islam Pegida street movement was born, the AfD scored 27.5 percent, up sharply from 9.7 percent five years ago, broadcasters ARD and ZDF forecast.

And it won between 22.5 and 24.5 percent in Brandenburg state, compared to 12.2 percent in 2014, said the initial projections.

The outright winners in Saxony were Merkel's Christian Democrats (CDU), who scored 32 to 33 percent, while Brandenburg was held by the Social Democrats (SPD), who came first with just over 27 percent.

AfD co-leader Alexander Gauland said "we are satisfied in Brandenburg as well as in Saxony" where his party had "punished" Merkel's conservatives.

He conceded that "yes, we are not yet the strongest force... We are working on it."

Though broadly anticipated in pre-election surveys, the outcome delivered another slap to the fragile coalition government of Merkel's CDU and their junior partners the SPD.

Aside from railing against asylum-seekers and Islam, the AfD has protested against plans to shutter coal mines to protect the climate and capitalised on resentment about perceived injustices since the 1989 fall of the Berlin Wall.

"Let's complete the change", it had vowed in the campaign, referring to the peaceful revolution that ended the one-party state and in 1990 brought national reunification.

Voter turnout was high as the tense political atmosphere mobilised both AfD supporters and their opponents.

All other parties had declared before the vote that they would not cooperate with the AfD, forcing the mainstream groups into new coalitions to achieve governing majorities.

The AfD has long co-opted the former pro-democracy chant "We are the people" and turned it against what it labels the "Merkel regime".

Eastern Germany is home to several of the AfD's most extremist leaders, among them Bjoern Hoecke, who has labelled Berlin's Holocaust memorial a "monument of shame".

His close ally, former paratrooper Andreas Kalbitz, 46, who has had deep ties to right-wing extremist groups, was the top candidate in Brandenburg.

Der Spiegel weekly has reported that in 2007 Kalbitz joined known German neo-Nazis on a visit to Athens that came to police attention when a swastika flag was flown from a hotel balcony.

Kalbitz confirmed to the magazine that he joined the trip but insisted that the event "was not conducive to arousing my further interest or approval".

The AfD, formed initially as a eurosceptic group, now focuses mainly on fear and anger over Germany's mass migrant influx since 2015.

Merkel, who also grew up in the east, had avoided campaigning on the ground ahead of Sunday's polls in the region, where she has in the past faced harsh abuse.

The veteran leader has already pledged to step down when her current term ends in 2021, but regional election upsets could speed up her government's demise. A third election will be held on October 27 in the eastern state of Thuringia.

Poor results for the SPD, already demoralised by a string of election defeats, were expected to again boost internal critics who want the party to leave Merkel's government quickly.