Facebook, Google and Twitter will be deleting hate speech posted on their websites in Germany within 24 hours.

The agreement comes after the German government started struggling with the influx of more than 1 million refugees this year, and social platforms started being bombarded with anti-foreigner comments.

Germany has welcomed thousands of refugees from war torn regions of Syria, Iraq and Afghanistan which has triggered a backlash from nationalists, including neo-Nazis, reported the BBC.

The new agreement is expected to make it easier for users and anti-racism groups to report hate speech to specialist teams of the three companies.

Germany is taking serious steps to remove the racist comments, as last month the country launched an investigation into the European head of Facebook over the failure to remove racist hate speech in the platform.

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

"And we agree that as a rule this should be possible within 24 hours."

The companies are making efforts to reduce online tolls as all of them have ‘report feature’ that lets users report about a particular post or person.

Facebook also takes posts down if they breach the company policies. Recently, it took down a page belonging to one of the San Bernardino shooter.