Court asks YouTube to remove anti-Islam clip while Google executive is arrested for failing to remove another video.

A Brazilian court has ordered YouTube to remove an anti-Islam video that prompted violent protests across the Muslim world, while an elections court has ordered the arrest of a Google executive after the popular video-sharing service failed to remove a video attacking a mayoral candidate.

Tuesday’s decision by a state court in Sao Paulo, home to a large Middle Eastern immigrant community, came just hours after Brazilian President Dilma Rousseff criticised “Islamophobia” in Western countries in a speech at the UN.

In a statement, the court said Judge Gilson Delgado Miranda gave the video-sharing site ten days to remove videos of the film, “Innocence of Muslims”.

After that, it will face fines of $5,000 a day for every day the clips remain accessible in Brazil.

The case against the controversial film was brought by a Brazilian Muslim group, the National Islamic Union, against Google Inc, the owner of YouTube, for posting on the internet a film it said was offensive and a violation of the constitutional right to freedom of religion.

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 was not 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.

Google is appealing the order, which follows a similar decision by another Brazilian election judge. In that case, a judge found another senior executive responsible for violating local election law. That decision was overturned last week.

The legal challenges underline broader questions about Google’s responsibility for content uploaded by third parties to its websites.

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.