What does Alternative for Germany (AfD) want?
The right-wing nationalist Alternative for Germany (AfD) has pushed Chancellor Angela Merkel's ruling conservatives into third place in a regional election.
The AfD was founded in 2013 as an anti-euro party but has turned its focus to immigration and Islam. It now has MPs in nine of Germany's 16 state parliaments, and is aiming to win its first seats nationally in next year's federal elections.
What does the AfD stand for, and why has its popularity grown?
Campaigning against mass immigration
The AfD has capitalised on a nationalist backlash against Chancellor Merkel's welcome for more than a million migrants and refugees in 2015.
Anxiety about immigration dominated the Mecklenburg-Western Pomerania election on 4 September, enabling the AfD to take second place (almost 21%), behind the centre-left Social Democrats (SPD - 30.6%) but ahead of Mrs Merkel's Christian Democrats (CDU - 19%).
When the numbers of migrants arriving in Germany surged in 2014-2015 the AfD made that the focus of its party platform. There were contacts with the anti-immigration Pegida movement, which staged weekly marches against what it called "the Islamisation of the West".
The AfD also adopted some of Pegida's anti-establishment rhetoric, for example the slogan "Luegenpresse" ("lying press"), which has echoes of the Nazi era.
Germany must reintroduce permanent border controls and the EU's external borders must be "completely shut", the AfD says. That position contradicts Schengen - the EU's free movement zone, covering most of Europe, where border checks are generally minimal.
AfD leader Frauke Petry has said German police should "if necessary" shoot at migrants seeking to enter the country illegally.
The AfD calls for stricter asylum rules to curb abuse of the system, including vetting of claims in countries of origin that are deemed "safe", to stop so many migrants coming to Germany.
Challenging Islam as 'not German'
In May 2016, the AfD adopted an explicitly anti-Islam policy, and its programme (in German) has a section explaining why it believes "Islam does not belong to Germany".
There is no room for Muslim practices and beliefs that go against "the free, democratic social foundation, our laws and the Judaeo-Christian and humanistic bases of our culture", it says.
So the AfD would ban foreign funding of mosques in Germany, ban the burka (full-body veil) and the Muslim call to prayer, and put all imams through a state vetting procedure.
"Moderate" Muslims who accept integration are "valued members of society", the programme says. But it argues that multiculturalism does not work.
An estimated three million people of Turkish origin live in Germany, most of them Muslims.
The AfD rejects as "degrading" the EU's controversial deal with Turkey, aimed at stopping the influx of migrants via the Balkans.
In return for Turkish help in reducing the numbers reaching the Greek islands, the EU offered visa-free travel to the Schengen zone. Turkey also wants to see real progress in its problematic negotiations to join the EU.
Against the euro
The AfD's launch in early 2013 was all about challenging the eurozone bailouts and rejecting the EU's arguments for keeping the euro.
It has since veered right with policies on migrants and Islam but still promises to give German voters a referendum on the euro.
The party's first leader, Bernd Lucke, led a group of economists who objected to the bailouts of Greece and other struggling southern European countries. They said German taxpayers should not be made liable for massive debts incurred by profligate eurozone governments.
Mr Lucke left the AfD in 2015, arguing that it was becoming increasingly xenophobic. It was the first of several high-profile power struggles in the AfD.
The party tapped into widespread German anxiety about the Greek debt crisis, and seven AfD members were elected to the European Parliament in 2014. However, only two of those MEPs remain in the AfD, after policy disputes.
Its anti-euro policy echoes the Euroscepticism of other right-wing parties in Europe, especially the French National Front (FN), the UK Independence Party (UKIP) and Austria's Freedom Party (FPOe).
More powers must return to the nation states, the AfD says, opposing all "centralising" moves in the EU, and anything that smacks of Euro-federalism.
If the EU fails to reform and continues centralising, the AfD says, the party will seek to pull Germany out of the EU.
In another echo of anti-EU parties, the AfD argues that elite, establishment politicians are too remote from ordinary voters, and that more policies should be decided by Swiss-style referendums.
AfD leader Frauke Petry has launched an alliance with Austria's FPOe, which is hoping to win a re-run presidential election in October.
A note on terminology: The BBC uses the term migrant to refer to all people on the move who have yet to complete the legal process of claiming asylum. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.