Social networks and other online content providers will have to remove paedophile and terrorism-related content from their platforms within the hour or face a fine of up to 4% of their global revenue under a French law voted in on Wednesday.
For other "manifestly illicit" content, companies such as Facebook, Twitter, YouTube, Instagram and Snapchat will have 24 hours to remove it, according to the law, which sets up a specialised digital prosecutor at the courts and a government unit to observe hate speech online.
Justice Minister Nicole Belloubet told parliament the law will help reduce online hate speech.
"People will think twice before crossing the red line if they know that there is a high likelihood that they will be held to account," she said.
Free-speech advocates criticised the new law.
Online civil liberties defence group La Quadrature du Net(LQDN) said in a statement the legislator should have instead targeted the Internet giants' business models.
It said it was unrealistic to think content could be withdrawn within the hour and the law was unnecessary.
"If the site does not censure the content (for instance because the complaint was sent during the weekend or at night), then police can force Internet service providers to block the site everywhere in France," it said.
Twitter France public affairs chief Audrey Herblin-Stoop said the company would continue to work closely with the government to build a safer Internet and fight against illegal hate speech, while protecting an open internet, freedom of expression and fair competition.
She said it was a top priority to ensure public debate was civil, adding Twitter's investments in technologies that signal hate speech will reduce the burden on users of having to call out illicit content.
For one in two tweets on which the company has taken action, it had already been alerted by software, compared to 1 in 5 in 2018, she said.
Far-right National Rally party president Marine Le Pen said the law was "a serious violation of the freedom of expression".
Facebook did not return calls and emails seeking comment, Google and Snapchat were not immediately available for comment.
(Reporting by Elizabeth Pineau and Mathieu Rosemain; Writing by Geert De Clercq; Editing by David Evans and Barbara Lewis)