PARIS — France’s National Assembly on Tuesday adopted a bill designed to curtail online hate speech, giving social media platforms 24 hours to remove hateful content or risk fines of up to 4 percent of their global revenue.

The bill now goes to the French Senate and could become law after Parliament’s summer recess.

French President Emmanuel Macron has been a vocal advocate of the need to regulate hate speech on platforms such as Facebook and Twitter before it can provoke real-life violence. Macron began the push amid an upsurge in anti-Semitism. And after a gunman linked to online hate groups live-streamed his attack on two New Zealand mosques in March, Macron joined New Zealand Prime Minister Jacinda Ardern in calling for an international effort to eradicate violent and extremist content.

In France, the draft legislation was proposed by Laetitia Avia, a lawmaker from the Paris area and Macron’s party. As a black woman, she has faced online harassment and threats.

The premise of the bill was summed up by a campaign video in which a man wears a giant billboard with anti-Semitic and other violent slogans. Passersby are clearly disturbed. Some stop to confront him.

“It shocks you in the street,” Avia wrote, introducing that video. “Why accept it on the Internet?”

The bill encourages users to report any online statements they deem racist, sexist or homophobic, or that might incite terrorist violence or harassment. It then places the onus on the social media platforms to review flagged content and remove objectively offensive items within a day.

Under a similar law in Germany, authorities fined Facebook $2.3 million last week for underreporting how many complaints it had received about illegal content.

Critics point to potential freedom of speech violations.

The body that would be responsible for enforcing the new regulations is France’s Conseil Supérieur de l’Audiovisuel (CSA), its general broadcasting regulator. But the CSA is an agency whose head is ultimately appointed by the president.

Others note that France — certainly in comparison to the United States — already has stringent hate speech legislation, in which statements of the varieties specified in the new bill are already punishable by law. For free-speech advocates, hate speech is a question for a judicial authorities to decide — not for Facebook and Twitter.

“The role of justice must be preserved,” France’s League of Human Rights wrote to the authors of the bill. “The assessment of the illegal nature of hate content cannot be entrusted to platform operators alone, at the risk of inducing the privatization of judicial functions and undermining the democratic safeguards for our citizens.”

But there was less anxiety within France’s lower chamber of Parliament: The bill passed 434-33.

“If we have put so much determination in this fight, it is because we think that we can change the course of things and not yield to fatalism,” Avia said during the proceedings Tuesday, which were broadcast. “That we must protect Internet users. That we have an obligation of results.”