A prominent lawmaker with the nationalist and anti-Islam Alternative for Germany party has run into trouble with police and Twitter over her response to a Cologne police tweet offering New Year greetings in Arabic.

Beatrix von Storch tweeted her objections to Saturday's tweet in which she strongly criticised the Muslims. Subsequently, Von Storch's Twitter account was blocked for several hours on Monday over a suspected breach of rules on hate speech.

Police said on Tuesday they filed a criminal complaint with prosecutors over suspected incitement.

Von Storch is one of 92 lawmakers for Alternative for Germany, or AfD, in the national parliament and her immunity from prosecution would have to be lifted for an investigation to be launched.

New Year celebrations in Cologne were overshadowed two years ago when hundreds of women complained of being groped and robbed.

The argument over von Storch's tweet and a similar post on Facebook that she said was blocked in Germany coincided with the full entry into force on Monday of a law aimed at cracking down on hate speech on social networks. A requirement has now taken effect for “clearly criminal” posts to be deleted or blocked within 24 hours.

AfD leader Alexander Gauland portrayed the incident as a consequence of the new law, which his party has strongly opposed, declaring that it is “already showing its freedom-curbing effect on the first day of the new year.” He called on the social media users to post the deleted posts.