* Ruling comes after president criticized "Islamophobia"
* Lawsuit seeking ban brought by Brazilian Muslim group
* Judge says ban does not hurt freedom of thought
BRASILIA, Sept 25 A Brazilian court on Tuesday banned an online anti-Islam movie that spawned violent protests across the Muslim world and gave YouTube 10 days to pull the film's trailer from its website.
The decision by a state court in Sao Paulo, home to a large Middle Eastern immigrant community, came hours after Brazilian President Dilma Rousseff criticized "Islamophobia" in Western countries in a speech at the United Nations.
The lawsuit against the controversial film was brought by a Brazilian Muslim group, the National Islamic Union, against YouTube owner Google Inc for posting on the Internet a film it said was offensive and a violation of the constitutional right to freedom of expression.
In his decision, Judge Gilson Delgado Miranda said the case juxtaposed freedom of expression and the need to protect individuals or groups of people from action that might incite religious discrimination.
Miranda concluded that banning something illegal should not "offend" freedom of thought and expression, according to the ruling posted online by Estado de S. Paulo newspaper.
It wasn't the only Brazilian court ruling against Google on Tuesday. Earlier, an elections court ordered the arrest of Google's most senior executive in Brazil after the company failed to take down YouTube videos attacking a local mayoral candidate.
The legal challenges underline broader questions about Google's responsibility for content uploaded by third parties to its websites, such as the anti-Islam video, which mocked the Prophet Mohammad and sparked a wave of protests and violence in the Muslim world.
Fifteen people were killed in Pakistan during demonstrations over the video on Friday. People involved in the film, an amateurish 13-minute clip of which was posted on YouTube, have said it was made by a 55-year-old California man, Nakoula Basseley Nakoula.