An elections court in Brazil has ordered the arrest of Google's most senior executive in the country 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, such as an anti-Islam video that sparked a wave of protests and violence in the Muslim world.

A spokesman for the regional elections court in Brazil’s Mato Grosso do Sul state said on Tuesday that a judge had ordered the arrest of Fabio José Silva Coelho, Google’s top executive in Brazil, unless the videos attacking a mayoral candidate were removed.

"Google is appealing the decision that ordered the removal of the video on YouTube because, as a platform, Google is not responsible for the content posted to its site," the company said through a spokesman in Brazil.

The arrest warrants for Google executives follow the filing of criminal charges in March against Chevron Corp and Transocean Ltd and 17 of their employees and executives, in a case that showed the Brazilian justice systems’ willingness to target senior executives for alleged misdeeds.