BERLIN (Reuters) - Top officials in Germany’s ruling coalition said on Friday they planned legislation to crack down on “hate speech” and fake news on Facebook and other social media platforms, and impose stiff penalties if such messages were not quickly removed.

Politicians are worried about how hate speech and fake news could sway public opinion ahead of elections next year in which Merkel will be running for a fourth term and facing an increasingly popular far right.

“There has only been talk for too long. Now we in the coalition will take action at the beginning of next year,” Volker Kauder, a senior member of Chancellor Angela Merkel’s Christian Democrats (CDU), said in a statement.

Facebook Inc FB.O said on Thursday it would take measures to prevent fake news spreading on its platform. Users would find it easier to flag fake articles as a hoax, and organizations would be deployed to check facts.

The statement suggested the ruling coalition was not altogether convinced by the steps announced by Facebook.

Kauder said the legislation would require social media companies to set up offices that would respond to complaints from people affected by hateful messages within 24 hours.

“We plan to impose high penalties that would affect companies like Facebook if they do not meet their responsibilities,” Kauder said.

Thomas Oppermann, who heads the Social Democrats in parliament, told Der Spiegel magazine Facebook could face fines of up to 500,000 euros if they did not remove fake news and other inappropriate messages within 24 hours.

“Facebook did not avail itself of the opportunity to regulate the issue of complaint management itself,” Oppermann told Spiegel. “Now market dominating platforms like Facebook will be legally required to build a legal protection office in Germany that is available 24 hours a day, 365 days a year.”

German Justice Minister Heiko Maas told Sueddeutsche Zeitung newspaper the government was carefully monitoring Facebook’s approach to removing illegal content and would draw “urgent legal consequences” if removal rates did not increase.

“We expect clear improvements in Facebook’s removal practice. The standard must be German law,” the paper quoted him as saying.

Germany is seen as a front-runner when it comes to forcing Facebook to step up efforts to police online hate speech, which has risen here following an influx of almost one million migrants, mainly from the Middle East, last year.

The issue of fake news has taken on new importance in recent weeks after warnings by German and U.S. intelligence agencies that Russia is seeking to influence elections and sway public opinion in both countries.