Facebook, Twitter, and Google have agreed to remove hate speech from its platforms within 24 hours in Germany, where the companies have come under increased pressure to curb racism online. As Reuters reports, the web companies committed to the measure under a new agreement with German authorities.

The agreement comes as Germany continues to grapple with the arrival of more than 1 million refugees and migrants from war-torn countries like Syria and Afghanistan. The crisis has sparked a xenophobic backlash from far-right nationalist groups on social media, and German officials and web users have criticized web companies for not doing more to curb hateful speech.

"When the limits of free speech are trespassed... such content has to be deleted from the net."

"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," German Justice Minister Heiko Maas told reporters Tuesday. "And we agree that as a rule, this should be possible within 24 hours."

Maas added that the deal will ensure that the companies adhere to German law when policing hate speech, rather than their own internal policies. Under German law, public comments inciting violence against specific ethnic or religious groups are punishable by up to three years in prison. "Specialist teams" at each company will evaluate complaints and make it easier for users to report content that incites hatred or violence, Mass said.

Maas urged Facebook to be more proactive in policing hate speech in a letter sent in August, alleging that the company is quicker to remove nudity or sexual imagery than it is racist or xenophobic content. Facebook later said it would do more to identify hateful content more quickly, though its response did little to quell frustration among German users and regulators.

In November, prosecutors in Hamburg opened an investigation into Martin Ott, Facebook's managing director for northern, central, and eastern Europe, saying he may be held responsible for the company's slow response. At the time, Facebook said the allegations "lack merit." Over the weekend, a group of 15 to 20 people vandalized Facebook's German headquarters, spray painting "Facebook dislike" on one of its walls. In October, the Bild newspaper, Germany's top-selling daily, ran a double-page spread full of racist comments posted by Facebook users, one day after anti-Muslim groups demonstrated in the eastern city of Dresden.