Two police officers have been injured in protests outside the German Alternative for Germany (AfD) party convention in Cologne.
Protests against the populist right-wing party were expected to attract at least 50,000 demonstrators - including 1,000 hard-left activists - who oppose the party's anti-immigrant rhetoric.
Over 4,000 police officers were drafted in to keep the peace at the event, some wearing riot gear, and armoured trucks were also deployed.
Police cars were set ablaze during the protest and a police spokesman described as "very dynamic" and "fairly aggressive" in some areas.
Germany's n-tv showed a group of around 50 people clashing with police on horses and reported that police used pepper spray against some of the demonstrators.
Around 600 AFD delegates were meeting at a convention in Cologne's old town to discuss policy for September's national elections.
Their co-chief Frauke Petry has recently been criticised for splitting the party down the middle in an attempt to make them more electable.
She has tried to move away from the party's far-right ideology as "fundamental" opposition and is keen to join coalitions in order to get into power.
However, at the start of the congress meeting her motion to discuss forging alliances with other parties was voted down by the majority of the delegates.
Ahead of the convention, Ms Petry, who is heavily pregnant, announced that she would not run as the party's lead candidate.
Despite losing support over the last few months, the party is polling between eight to 10%, which would be enough to give it seats in parliament for the first time.
The German election will be held on 24 September.