The arrest of Diego Dzodan, the vice president of Facebook for Latin America, by Brazilian federal police in Sao Paulo has stirred up controversy in the country.

The executive was arrested on Tuesday morning after Facebook, the parent company of WhatsApp, declined to follow the orders of a court in the state of Sergipe to turn over information on application usage by people accused of drug trafficking.

After the arrest, the company filed a habeas corpus petition that was reviewed and granted by a judge in the highest state court in Sergipe early Wednesday, leading to Dzodan’s release, according to local media.

The police, however, acted appropriately in the case, according to Frederico Meinberg Ceroy, the president of the Brazilian Digital Law Institute. Facebook and WhatsApp, which has no official representation in the country, are the only two large technology companies that do not cooperate with law enforcement in Brazil in such cases, he pointed out.

"Requests for information in Brazil are made in a thoughtful way, usually only in cases of serious crimes such as pedophilia, drug trafficking, and organized crime," Ceroy said. "Given this, you cannot talk about violation of privacy, abuse or excess."

He noted that Facebook had already received several warnings and fines in this and similar cases related to criminal activities and drug trafficking.

But Carlos Affonso, the director of the Rio de Janeiro Institute of Technology and Society and a professor of law at the State University of Rio de Janeiro, pointed out that the Dzodan arrest may be seen as a warning outside Brazil. "I don’t think it sends a good message in the long term to technology companies seeking to establish and have services in Brazil," he said.

WhatsApp says that it does not have the content of conversations between its users because the app does not store the data and encrypts end-to-end communications, but this argument was rebutted by Ceroy.

"The judge understands the difficulty in relation to content, he wants something else, like the IMEI of the used device, and information on the operating system, which is information that helps investigations," Ceroy said. IMEI numbers are usually unique and are used to identify mobile phones.

The case may seem similar to the FBI-Apple case in the U.S., where Apple is appealing an order to help law enforcement access a password-protected iPhone belonging to one of the San Bernardino mass shooters. But although they may seem similar at first, experts say there is no comparison between the two cases.

"The U.S. case is really absurd. But what the Brazilian judiciary wants is just information that Facebook has," says Ceroy.

Facebook issued a statement on Tuesday shortly after the arrest.

"We are disappointed with the extreme and disproportionate measure to have an executive of Facebook escorted to the police station due to a case involving WhatsApp, which operates separately from Facebook. Facebook has always been and will always be available to answer questions that Brazilian authorities can have," Facebook said.

According to the police, the Argentine executive was jailed due to "repeated failure to comply with court orders in investigations that are secret and involve organized crime and drug trafficking." The investigation in question is being conducted in judicial secrecy in a criminal court in the state of Sergipe.

WhatsApp was blocked in Brazil for about a day in December 2015 for failing to comply with similar court orders.

In September 2012, the then-director general of Google Brazil, Fábio Coelho, was arrested by the federal police after the company refused to remove a YouTube video that made several accusations against a mayor candidate for the city of Campo Grande.

This story was originally published by Computerworld Brazil.

Luiz Mazetto is executive editor of IDG Brazil.