A French court on Tuesday ordered Twitter to give activists full access to all of its documents relating to its efforts to fight racism, sexism and other forms of hate speech on the social network.

Six anti-discrimination groups had taken Twitter to court in France last year, accusing the US social media giant of "long-term and persistent" failures in blocking hateful comments from the site.

The Paris court ordered Twitter to grant the campaign groups full access to all documents relating to the company's efforts to combat hate speech since May 2020. The ruling applies to Twitter's global operation, not just France.

Twitter must hand over "all administrative, contractual, technical or commercial documents" detailing the resources it has assigned to fight homophobic, racist and sexist discourse on the site, as well as the offence of "condoning crimes against humanity".

The San Francisco-based company was given two months to comply with the ruling, which also said it must reveal how many moderators it employs in France to examine posts flagged as hateful, and data on the posts they process.

Twitter said it was studying the court order.

"Our absolute priority is to assure the security of people using our platform," the company told AFP, adding: "We commit to building a safer internet, to combatting online hate and to improving the serenity of public discourse."

The ruling was welcomed by the Union of French Jewish Students (UEJF), which took Twitter to court alongside five other groups that campaign against homophobia, racism and anti-Semitism.

"Twitter will finally have to take responsibility, stop equivocating and put ethics before profit and international expansion," the UEJF said in a statement on its website.

French anti-discrimination groups took Twitter to court last year, accusing it of 'long-term and persistent' failures in blocking hateful comments
French anti-discrimination groups took Twitter to court last year, accusing it of 'long-term and persistent' failures in blocking hateful comments AFP / Lionel BONAVENTURE

Twitter's hateful conduct policy bans users from promoting violence or threatening or attacking people based on their race, religion, gender identity or disability, among other forms of discrimination.

Like other social media giants it allows users to report posts they believe are hateful, and employs moderators to vet the content.

But anti-discrimination groups have long complained that holes in the policy allow hateful comments to stay online in many cases.

French prosecutors on Tuesday said they have opened an investigation into a wave of racist comments posted on Twitter targeting members of the national football team.

The comments, notably targeting black Paris Saint-Germain star Kylian Mbappe, were posted after France was eliminated from the Euro 2020 tournament last week.

France has also been having a wider public debate over how to balance the right to free speech with the need to prevent hate speech, in the wake of the controversial case of a teenager known as Mila.

The 18-year-old sparked a furore last year when her videos, criticising Islam in vulgar terms, went viral on social media.

Thirteen people are on trial accused of subjecting her to such vicious harassment that she was forced to leave school and was placed under police protection.

While President Emmanuel Macron is among those who have defended her right to blaspheme, former Socialist president Francois Hollande said her original remarks amounted to "hate speech" against Muslims.