Germany has passed a law that creates tight deadlines in which social media websites must remove hate speech. These platforms now face massive fines if they don't comply.

Within 24 hours, websites like Facebook, Twitter, and YouTube must remove postings of hate speech or other material that's "obviously illegal" under German law. If content has been flagged as offensive but isn't obviously illegal, it must be examined within seven days, according to a BBC report on the law.

Failure to comply could lead to fines that start at 5 million euros and range up to 50 million euros, or about $57 million.

The law was passed earlier today, which is the last legislative day before the Bundestag summer break.

Germany has tough laws against hate speech. The country bans speech such as the use of Nazi symbols and Holocaust denial. According to a New York Times report, a German study published earlier this year found that Facebook and Twitter hadn't been able to meet a national target of removing 70 percent of online hate speech within 24 hours.

Google and Twitter didn't immediately comment on the new law. Facebook said it had already made "substantial progress" in removing illegal content, and it has hired another 3,000 staffers this year to sift through the millions of reports it gets about offensive content each week.

The bill has been criticized by some human rights activists, who may challenge the law in Brussels as a breach of EU law.

Mirko Hohmann and Alexander Pirant of Berlin's Global Public Policy Institute were quoted by the NYT calling the law "misguided."

"Setting the rules of the digital public square, including the identification of what is lawful and what is not, should not be left to private companies," they said.

German legislators from the Social Democratic Party first floated the idea of a 24-hour deadline for online hate speech to be removed last year, although that proposal came with much lower (500,000 euro) fines.