Facebook, Google and Twitter have agreed crack down on hate speech in Germany more aggressively. The tech giants have pledged to delete hate speech on their platforms within 24 hours.

The German government hopes to tackle the rise in hate speech on social media that has accompanied the large influx of refugees. The country is now on pace to take in one million asylum-seekers this year and has been under a great deal of pressure to tackle the backlash from the far right.

While Facebook, Google, and Twitter already have their own policies on hate speech, they will now have to apply Germany’s stricter anti-hate speech rules online. Under German law, hate speech that attacks someone’s race, ethnicity, religion, sex, or disability is punishable by up to five years in prison.

The deal will purportedly make it easier for users to flag hate speech, which will then be examined by specialist teams and possibly removed. It’s unclear what impact, if any, the deal will have on hateful comments made outside of Germany, which can still be seen by German citizens on social networks.

“When the limits of free speech are trespassed, when it is about criminal expressions, sedition, incitement to carry out criminal offenses that threaten people, such content has to be deleted from the net,” said German Justice Minister Heiko Maas, according to Reuters.

The agreement follows recent tension between the German government and Facebook. The government accused Facebook of facilitating hate speech; earlier this year German prosecutors launched a criminal probe against top executives at Facebook for failing to remove racist hate speech on its site.