BAUTZEN, Germany - The nationalist, anti-migrant Alternative for Germany swept into third place with a robust showing in the former communist East German states, where discontent is widespread over dim economic prospects and Chancellor Angela Merkel's decision to open the country's doors to migrants has met with its greatest resistance.

The hill-top town of Bautzen, in Saxony near Germany's borders with the Czech Republic and Poland, has been a visible example of such disillusionment, with clashes breaking out in the streets last year between residents and asylum-seekers.

In Sunday's election, voters in the town of 40,000 turned strongly to Alternative for Germany, known as AfD, ousting Merkel's Christian Democratic Union party from a seat it had held for more than 25 years.

“I've voted for the CDU for the last forty years, and this was the first time I voted for a different party,” said Jens Hamburger, a 72-year-old retiree. “It wasn't easy for me, but this woman should have gotten an even bigger knock over her head,” he added, angrily poking his cane into the air as he talked about Merkel.

He said many eastern Germans felt that Merkel, who grew up in the former East Germany, had betrayed them by not doing more to improve living conditions in the east.

“She'd practiced the politics of indifference toward us,” Hamburger said. “I voted for AfD and I'm very content with the results.”

AfD won 12.6 per cent of the vote overall, but captured 22.5 per cent in the east. Its success followed a campaign focused on criticism of the chancellor's decision to open the country's doors to more than 1 million asylum-seekers over the past two years. In Saxony, where Bautzen is located, it narrowly topped Merkel's CDU to become the biggest party, with 27 per cent.

Merkel told reporters that AfD's support in the east was mirrored in some economically depressed areas of the west by voters with similar worries, and conceded she would have to do more to address their concerns.

“It's simply fear of losing out, and concern that what they have today could be lost, be it through globalization, be it through sharing with refugees,” she said.

Alexander Ahrens, the mayor of Bautzen whose centre-left Social Democratic Party suffered a stinging defeat in the election, said his townspeople voted for the AfD out of fear, not hatred. He said that the town has fewer than 2 per cent foreign residents, including recent migrants.

“The people who voted for AfD are not bad people,” he told The Associated Press. “One has to talk to the people, approach them, and should by no means judge them for their fears.”

All mainstream parties have ruled out working with AfD, and co-leader Alice Weidel told reporters in Berlin on Monday that its plan was to provide “constructive opposition.”

“We have a very clear mandate from the voters, and there is no time to waste,” she said.

Alexander Gauland, the other co-leader, sought to allay fears expressed by Jewish groups about his party's success. The Anti-Defamation League has called the AfD result a “disturbing milestone,” saying “its leaders have made anti-Semitic statements and played down the evil of the Nazi regime.”

Gauland has repeatedly insisted “we have the right to be proud of the achievements of Germans soldiers in two world wars.” Other comments that have caused concern included one from AfD's leader in Thuringia state, Bjoern Hoecke, who called for a “U-turn” in the way Germany remembers its Nazi past.

Still, Gauland insisted that “there is nothing in our party, in our program, that could disturb the Jewish people who live here in Germany.”

But he emphasized the AfD would not shirk from its anti-migrant stance, saying “we want to take our country back.”

“Bringing a million people to this country takes a piece of our country away,” he said.

Karsten Hilse, a policeman who won the Bautzen seat for the AfD, told the AP that many of his supporters had lived in western Germany and returned home complaining of the number of immigrants they had encountered.

Hilse said his backers told him they didn't like it “when you walk through the inner city and then 15 women who are fully veiled come your way.” He added that he and his party “don't want to change our culture and our traditions.”

The 52-year-old, who described himself as “a regular street cop,” seemed a little overwhelmed that he was going to have a seat in the country's parliament. He said he planned to use his position to work for a more positive relationship with Russia, establish better border controls and ensure that migrants who don't fit in with German culture are kept out.

Hilse said he was eager to get to Berlin to get down to business.

“Tomorrow is our first caucus meeting,” he said excitedly, though he said he didn't yet have any real staff nor an apartment in the German capital. “I want to go to Berlin now!” he said as he left his office.

In the capital, the leadership's first appearance after election night was marred by a public eruption of long-running cracks at the top.

Co-chairwoman Frauke Petry - who was recently sidelined after she urged her party to exclude members who express extremist views - stormed out of a news conference, leaving three other top party leaders chuckling and smirking.

“An anarchic party ... can be successful in opposition, but it cannot make voters a credible offer for government,” Petry said, adding she wouldn't join AfD's parliamentary caucus.