Riot police fired water canon at protesters blocking a road outside an Alternative for Germany (AfD) congress on Saturday, as members of the far-right party gathered inside preparing to pick new leaders.
Anti-AfD activists regrouped to wave placards reading "Hanover against Nazis" and "Stand up to racism", underlining the divisive impact the party has had since it rose to enter the Bundestag lower house for the first time in a Sept. 24 election.
Members will vote for two senior officials who will determine whether AfD doubles down on its anti-Islam message or softens its rhetoric to broaden its support base before two regional elections next year.
As the congress got underway, AfD leader Joerg Meuthen, a moderating force expected to win re-election, praised the party often beset by internal strife for showing unity after two senior members quit in September in protest against what they saw as an unstoppable populist streak.
"There are people in this country who don't only say 'We can do this' but who actually manage to do something," Meuthen told delegates, putting a new twist on Chancellor Angela Merkel's "Wir schaffen das" (We can do it) message to those who doubted Germany can deal with a record influx of migrants in 2015.
Merkel, whose conservatives bled support to the AfD in the election, turned to the centre-left Social Democrats (SPD) last month after her efforts to form a coalition with the ecologist Greens and the pro-business Free Democrats (FDP) failed.
The collapse of the talks prolonged an impasse that highlighted how deep a mark on Germany's political landscape the rise of the AfD has left.
As thousands of protesters marched peacefully outside, AfD delegates watched a short film that painted a gloomy picture of Europe's largest economy being overrun by beggars, stone throwers and Muslims.
It showed a young man with a bandana covering his face preparing to throw a stone, a old man bending over a garbage bin and crowds in Muslim garb. A caption fades in: "We want our homeland back."
The German economy has been growing since 2010, creating friction among parties as to how surpluses should be spent and giving the government fiscal leeway to spend billions of euros on accommodating a record influx of asylum seekers.
Founded in 2013 as a vehicle to oppose euro zone bailouts, the AfD was polling at around 3 percent nationally two years ago on the eve of the refugee crisis.
The arrival of more than 1.6 million people seeking asylum in the two years to the end of 2016 has helped it morph into an anti-immigrant party that now has seats in 14 of Germany's 16 regional parliament.
Polls suggest it will win seats in elections next year in the southern state of Bavaria and the western region of Hesse, which would give it a foothold in all of Germany's state parliaments.
A key question that AfD delegates will vote on at the two-day congress is who should replace former co-chief Frauke Petry, who quit to become an independent member of parliament.
Her sudden departure two days after the AfD became the first far-right party to win seats in the Bundestag since the 1950s exposed deep rifts over whether the party should ditch controversial rhetoric such as Islam is not compatible with the German constitution.
The AfD's rise, which has coincided with strong gains by other anti-immigrant parties including in France and the Netherlands, has punctured the centrist consensus around which the mainstream parties have formed alliances in Germany.