Brussels, Sep 28: The European Union on Thursday gave an ultimatum to Facebook, Twitter and other social media companies to rid their platforms of hate speech or face legal consequences. The European Commission, EU's top regulator, said the social media firms are still failing to act fast enough. It said it would pass laws allowing the EU to impose punishments on companies that fail to act, CNN reported. European regulators have been pushing social media firms to remove racist and violent posts from their platforms in a timely manner for years. Facebook, Twitter, Microsoft and Google had all pledged to do more. In May 2016, the online platforms promised to review a majority of hate speech flagged by users within 24 hours and to remove any illegal content. "The situation is not sustainable. In more than 28% of cases, it takes more than one week for online platforms to take down illegal content," said Mariya Gabriel, the EU's top official in charge of the digital economy and society. The Commission said it will consider implementing new laws to tackle the problem if the online platforms fail to "take swift action over the coming months". It said it wants the companies to invest more in detecting of hate speech and work with trusted reviewers who were trained to know what constitutes hate speech. The Commission also wants companies to do a better job of preventing illegal content from reappearing. The punishments could be severe. Earlier this year, the EU ordered Google to pay $2.8 billion in an anti-trust fine. Several European countries aren't waiting for the EU to act. They're already pushing through strict laws punishing social media companies for being too lax when it comes to illegal hate speech. The German government approved a plan in April to start imposing fines of as much as $59 million on Facebook, Twitter and others if they fail to remove hate speech and fake news posts within 24 hours after being flagged. In the UK, a parliamentary committee had accused social media firms of prioritizing profit over user safety by continuing to host unlawful content. The committee called for "meaningful fines" if the companies do not improve fast.