The head of Germany's "anti-Islamisation" movement Pegida has quit after disparaging anti-refugee comments and a photo showing him apparently posing as Hitler emerged.
Lutz Bachmann apologised for Facebook comments he made in which he reportedly called refugees "animals" and "scumbags".
He did not mention the photo of him with Hitler-style hair and moustache.
Meanwhile, thousands of people have marched in Leipzig at a Pegida rally.
Police were deployed to the streets of the eastern German city to prevent clashes with members of a rival anti-Pegida demonstration.
Pegida supporters chanted "We are the people", while their opponents shouted "Get out of here."
There were no reports of violence.
The rival rallies came as Mr Bachmann apologised for his "ill-considered" remarks.
Pegida supporters and their opponents staged shouting matches, but no violence was reported
"Yes, I am stepping down from the board," he was quoted as telling Germany's Bild daily newspaper in an online report.
Pegida spokeswoman Kathrin Oertel said the anti-refugee comments went too far. However, she sought to play down the "Hitler" photo as a "joke" and "satire, which is every citizen's right".
But the German government condemned it. Vice-Chancellor Sigmar Gabriel told Bild: "Anyone in politics who poses as Hitler is either a total idiot or a Nazi. Reasonable people do not follow idiots, and decent people don't follow Nazis."
Pegida has focused on Leipzig after police banned a protest by the movement in Dresden on Monday over reports of an assassination plot against the movement's leaders.
What is Pegida?
- - Founded in Dresden by Lutz Bachmann in October 2014
- - Acronym for Patriotische Europaer gegen die Islamisierung des Abendlandes (Patriotic Europeans Against the Islamisation of the West)
- - Umbrella group for German right wing, attracting support from mainstream conservatives to neo-Nazi factions and football hooligans
- - Holds street protests against what it sees as a dangerous rise in the influence of Islam over European countries
- - Claims not to be racist or xenophobic
- - 19-point manifesto says the movement opposes extremism and calls for protection of Germany's Judeo-Christian culture
What is Pegida?
Marchers in Leipzig criticised Chancellor Angela Merkel's immigration policies
At the scene: Jenny Hill, BBC News in Leipzig
Police in riot helmets formed a human corridor to funnel Pegida supporters through a crowd of counter-protesters.
To shouts of 'Nazis out!' they emerged smiling, holding their German flags high, into the square where a makeshift stage was set.
An appetising smell of goulash filled the air. A stall was doing a roaring trade. The square filled with people and noise - police estimate about 15,000 people came to support Pegida. That makes this the biggest demonstration they've held - outside Dresden, where Monday's weekly march was cancelled amid security fears.
I asked a woman why she had come. "I'm German," she replied. "I don't want my daughter to end up wearing a burka."
As always, Pegida supporters demonstrate for a variety of reasons. Another man reckoned 5% - maybe 10% of the people here - are racists. He had come along, he told me, because he worried about race relations.
"We don't want the problems that you get in places like Birmingham and Edinburgh," he said.
A spokesman for state prosecutors in Dresden, the east German city which has been the focus of Pegida rallies this winter, told Reuters news agency that preliminary proceedings had been opened over comments attributed to Mr Bachmann.
"The suspicion is of incitement to popular hatred," the spokesman said.
Mr Bachmann has denied being a racist.
Despite his resignation, Ms Oertel said that "Pegida will go on."
The movement has forced its way on to the political agenda in Germany with rallies that have attracted tens of thousands of people. (BBC)