The right-wing populist Alternative for Germany (AfD) has railed against Chancellor Angela Merkel's open-door refugee policy, ending a long-standing taboo against extremist parties in the country's mainstream politics.

Similar to France's National Front and far-right politicians in Austria and the Netherlands, it has captured the protest vote with a xenophobic and anti-Islam platform and now polls around 14 percent nationwide.

After early gains in Germany's ex-communist east, it has won seats in a series of state elections, most recently in the capital Berlin Sunday, and will now be represented on the opposition benches of 10 of the country's 16 state assemblies.

The AfD was formed more than three years ago by economics professor Bernd Lucke as a eurosceptic fringe party, railing against expensive bailouts and urging a return to the Deutschmark.

As the financial crisis abated, the AfD underwent a leadership shift to campaign mainly against an influx of people fleeing war and misery, gathering steam as one million asylum seekers arrived in the EU's top economy last year.

The party has also captured conservative voters who feel abandoned by Merkel's increasingly centrist Christian Democratic Union, pushing for traditional "family values" and tough law and order policies and denying climate change.

The AfD is strongly nationalistic but rejects being labelled an extremist or "Nazi" party, a charge levelled by Social Democratic Vice Chancellor Sigmar Gabriel and others.

The party's leadership feuded recently after one of its regional lawmakers, Wolfgang Gedeon, sparked a storm with anti-Semitic remarks, including calling Holocaust deniers "dissidents".

- 'Recourse to firearms' -

The AfD's rise breaks with a taboo in post-World War II Germany, where guilt over the Nazi era runs deep and no far-right or extremist party has so far been able to gain a sustained foothold in national politics.

In 2013 elections, the young AfD only narrowly missed the five-percent hurdle to enter national parliament, but the following year sent seven deputies to the European Parliament with 6.5 percent of the vote.

In a shock result two weeks ago, the AfD scored more than 20 percent and beat Merkel's party in the poor, rural and ex-communist state of Mecklenburg-Western Pomerania, where the chancellor has her home seat.

Eager to spark media storms and capture headlines, AfD leaders have regularly caused outrage with racist remarks.

The AfD was formed more than three years ago by economics professor Bernd Lucke as a eurosceptic fringe party, railing against expensive bailouts and urging a return to the Deutschmark Daniel Bockwoldt, dpa/AFP/File

The party's most public face, 41-year-old Frauke Petry of the eastern, ex-communist Saxony state, has suggested police should be allowed to shoot at foreigners to stop them at the borders.

"No policeman wants to fire on a refugee and I don't want that either," she said. "But as a last resort there should be recourse to firearms."

AfD deputy leader Alexander Gauland said in May about star footballer Jerome Boateng, who was born in Berlin to a German mother and Ghanaian father, that "people find him good as a footballer, but they don't want to have a Boateng as a neighbour".

And another deputy leader, Beatrix von Storch, also made a jibe at players with immigrant roots after Germany's 2-0 defeat to France in the Euro 2016 semi-final, tweeting that "maybe next time the German NATIONAL TEAM should play again".