A visitor is seen at the You Tube stand during the annual MIPCOM television programme market in Cannes, southeastern France, October 3, 2011. (ERIC GAILLARD/REUTERS)

YouTube said Thursday that it will block a video about a Brazilian mayoral candidate after being denied the chance to appeal to keep the clip online.

The video service, a part of Google, announced the decision in a company blog post. In the post, Google Brazil country director Fabio Coelho also gave an abbreviated account of events that led to a court order for his arrest. He was detained, questioned and released on Wednesday.

According to an English translation of the post, written by Coelho, the company does not agree with the judge who found that the clip runs afoul of Brazilian election laws that forbid certain personal criticism of candidates during an election. But while YouTube was waiting for its appeal to be heard, a judge ordered Coelho’s arrest. The company learned late Wednesday night that its appeal has been denied and that it will have to block access to the video in the country.

Coelho said in his post that one offending clip was removed by the user who posted it. That user also closed his or her account, an action that Coelho believes illustrates what he called the “chilling effect” that situations such as the one in Brazil can have on free speech.

While Coelho said that Google and YouTube will remove videos that governments find to be illegal under local laws after a “valid court order or government complaint,” the company will push back against orders it finds “invalid.”

YouTube is “deeply disappointed” that it will not be able to argue its case, Coelho wrote, as it believes the videos included in the appeal were examples of “legitimate free speech” that should remain available to all users.

Throughout the post, Coelho reaffirmed Google’s commitment to protecting free expression, calling it a “tenet of free societies,” and even cited the portion of the United Nations’ Universal Declaration of Human Rights that deals with free expression.

YouTube, he said, should be a global platform for all of its users to speak out.

“Our goal is for YouTube to be a community that everyone can enjoy, as well as a platform for free speech around the world,” he wrote.

Related stories:

Brazilian court orders arrest of Google official over YouTube video

Google’s restricting of anti-Muslim video shows role of Web firms as free-speech arbiters

Court in Sao Paulo orders YouTube to take down anti-Islam film or face $5,000 a day fine

Judge denies actress’ request to take down YouTube clip for anti-Muslim film blamed for deaths