COLOGNE, Germany (Reuters) - Two police officers were injured and a police car was set ablaze during protests in Cologne on Saturday, police said, as some 600 delegates of the deeply divided anti-immigration Alternative for Germany (AfD) party met to discuss policy for September’s national elections.

AfD co-chief Frauke Petry suffered a crushing blow at the start of the congress when delegates voted down her motion calling for efforts to forge alliances with other parties in future rather than seeking to be a long-term opposition force. Her critics deny any split along these lines in the party.

Petry announced on Wednesday after a months-long power struggle that she would not lead the national election campaign of the party, a pariah in the German political landscape that has seen its poll numbers wane over the past few months. [nL8N1HR3UX]

A spokesman for the Cologne police said the situation in the city was “very dynamic” and “fairly aggressive” in some areas.

Over 4,000 police, many clad in riot gear and some on horseback, were braced for riots with as many 50,000 protesters expected, including about 1,000 hard left activists.

The spokesman said police stopped about 100 protesters early on Saturday for identity checks, but they were not detained.

Broadcaster n-tv showed a group of around 50 people clashing with police on horses, and a television correspondent said police used pepper spray against some of the demonstrators.

Slideshow ( 6 images )

The AfD, which rails against Chancellor Angela Merkel’s decision to welcome over a million migrants over the past two years, is polling between eight to 10 percent support ahead of September’s election.

That is enough to give the party seats in parliament for the first time, but well below peak support seen in late 2016.

In her opening speech, before which she received a standing ovation from some party members, Petry signaled she was willing to make compromises on her controversial motion for the party’s future strategy.

Petry has upset many within the party by introducing a motion in which she said the AfD should aim to join coalitions in future and govern, instead of being a “fundamental” opposition party that only made provocative statements.

But a majority of delegates voted around mid-day on Saturday against discussing her motion.