The messages, which were posted on Twitter and Facebook, have since been removed by both social networks
German far-right politicians slammed for anti-Muslim posts
German police have filed a complaint against a prominent member of Germany's far-right AfD party over an anti-Muslim tweet on New Year's Eve which they say violated laws against incitement to hate.
Beatrix von Storch, deputy leader of the party's parliamentary faction, had criticised Cologne police for sending a New Year's greeting in Arabic on Twitter.
"What the hell is going on with this country? Why is an official police site... tweeting in Arabic?" she wrote in a December 31 tweet. "Did you mean to placate the barbaric, Muslim, gang-raping hordes of men?"
Ms Von Storch's tweet - which she subsequently posted on Facebook as well - was apparently a reference to 2015 New Year's Eve celebrations in Cologne, which were marred by mass sex assaults on women by men of mostly migrant backgrounds.
Another AfD lawmaker is also being investigated after supporting Ms Von Storch.
Alice Weidel said on Facebook that authorities were submitting to "imported, marauding, groping, abusive, knife-stabbing migrant mobs".
Police said both women could be guilty of flouting anti-incitement laws.
Twitter and Facebook have since deleted the posts, while Twitter also temporarily suspended Ms Von Storch's account.
Their tough stance came as an anti-online hate speech law came into effect on January 1 in Germany.
Social media companies that fail to remove illegal inflammatory comments could face up to €50 million in fines.
AfD party chief Alexander Gauland took aim at the new rules, calling it “censorship” and saying the new regulations are "Stasi methods that remind me of communist East Germany".
Mr Gauland encouraged users of such websites to "keep publishing" the erased comments from the AfD members.
A Cologne police spokesman said it was long-standing practise to send out information in several languages during large gatherings and events.
"We simply want people to be able to understand us," said the spokesman.
The AfD took 92 parliamentary seats in September elections - the strongest showing for a far-right party in the post-war era - as it capitalised on discontent over the more than one million asylum seekers who have arrived in Germany since 2015.