After a legal battle spanning several months, Twitter has finally handed data over to French prosecutors to help them identify the authors of certain anti-Semitic tweets.

Jewish and anti-racism groups sued Twitter, requesting that the company provide data pertaining to the writers of anti-Semitic tweets using the hashtag #unbonjuif (#agoodjew) last year. In early 2012, a court ordered Twitter to disclose the data. Twitter appealed the decision, but lost.

SEE ALSO: Court Rules That Banning Sex Offenders From Facebook is Unconstitutional

Twitter announced Friday it had reached an agreement with France's Union of Jewish Students (UEJF), one of the groups that sued the company. As part of the agreement, Twitter provided the users' data — including IP and email addresses — to the Paris prosecutor. The settlement ends the dispute in the civil court.

"Further to discussions between the Parties and in response to a valid legal request, Twitter has provided the prosecutor of Paris, Presse et Libertés Publiques section of the Paris Tribunal de Grande Instance, with data that may enable the identification of certain users that the Vice-Prosecutor believes have violated French law," read a joint statement by Twitter and the UEJF.

The dispute was viewed as a landmark case in balancing free speech on the Internet and local anti-racism laws. French law prohibits Holocaust denial and hate speech, but Twitter argued that since the company is based in the United States, it was not required to comply with a French court order.

In the statement, the parties said this "puts an end to the dispute" and that they would "continue to work actively together in order to fight racism and anti-Semitism" along with the French human rights groups, according to the AFP.

The disclosure was "a great victory in the fight against racism and anti-Semitism" and "a big step in the fight against the feeling of impunity on the Internet," said Jonathan Hayoun, the president of the UEJF.

"This agreement is a reminder that you cannot do anything you want on the Internet. Twitter will no longer be a conduit for racists and anti-Semites where their anonymity will be protected," he said, as reported by AFP.

This is not the first time Twitter collaborated with foreign legal requests. In October of last year, it blocked German neo-Nazi accounts. But other times, it refused to comply with such requests. Last year, between January and July, a French government agency asked Twitter to remove certain content, but the company did not acquiesce, according to Twitter's transparency report.

What do you think about Twitter helping to identify anonymous users? Share your thoughts in the comments.

Image via David McNew/Getty Images