Members of the anti-immigrant Alternative for Germany (AfD) party elected a right-wing nationalist to be their co-leader on Saturday, signalling a possible toughening of tone before regional votes next year.
A party congress chose Alexander Gauland - who once defended an AfD member who had said history should be rewritten to focus on German victims of World War Two - to return to the post he had held until 2015.
As members deliberated, thousands of anti-AfD protesters marched outside carrying placards reading "Hanover against Nazis" and "Stand up to racism".
Earlier, riot police fired water cannon at dozens of protesters who blocked a road leading to the congress, underlining the divisive impact the party has had since it entered the Bundestag lower house for the first time in a Sept. 24 election.
The party's incumbent leader Jorg Meuthen - seen as a relative moderate in the movement - won enough votes to keep his post.
But in a vote that dragged into the evening, he was joined as co-leader by Gauland, who ran for the post at the last minute after another candidate seen as a moderate, Georg Pazderski, failed to win enough votes.