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.'Joke'
The rival rallies came as Mr Bachmann apologised for his "ill-considered" remarks.
"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?
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.