A senior Facebook executive was detained in Sao Paolo, Brazil, on Tuesday after the firm's cellphone chat subsidiary WhatsApp told federal authorities it was unable to intercept instant messages in connection with a drug investigation.
Diego Dzodan, Facebook's vice president for Latin America, was taken into custody on his way into work following a judicial order from a judge, said WhatsApp spokesman Matt Steinfeld.
The case reflects the growing conflict between technology firms and governments around the world over access to customer data.
As more companies use strong encryption on their customers' devices and communication, the information becomes increasingly out of reach for law enforcement, even if officials have obtained warrants.
Compounding the issue, a US firm operating overseas can often find it difficult to comply with local laws when they conflict with US rules. Congress, for instance, bars American companies from providing court-ordered wiretaps to anyone except the U.S. government.
Both WhatsApp and Facebook are hugely popular in Brazil, where WhatsApp has more than 100 million users.
WhatsApp has said it is moving to strong encryption on its platform to protect users' security and privacy.
WhatsApp cannot provide information we do not have.
Although US law enforcement says it supports encryption, it has expressed frustration with its inability to gain access to user data in criminal and terrorism cases. The FBI is wrangling with Apple in U.S. courts over access to a phone used by one of the shooters in the San Bernardino, California, terrorist attack in December.
Brazil's Federal Police said in a statement that Federal Police in the northeastern state of Sergipe had requested the arrest, following repeated failures by Facebook to comply with court orders to supply information from the social-media site.
Steinfeld said that the company's platform is simply not built for wiretaps. The company, which is based in Mountain View, California, separately from Facebook, does not have an office in Brazil or store the messages on its servers. It encrypts them when they are in transit between users.
Facebook said in a statement the company is "disappointed with the extreme and disproportionate measure of having a Facebook executive escorted to a police station in connection with a case involving WhatsApp, which operates separately from Facebook."
The company added:
Facebook has always been and will be available to address any questions Brazilian authorities may have.
The Brazilian police said in a statement that it wanted the information for a probe into organized crime and drug trafficking. Dzodan "is currently providing statements to the Federal Police in Sao Paulo, where he will remain jailed at the disposition of the justice system," the police said.
The police requested the wiretap four months ago, after officers investigating a drug gang seized a car carrying cocaine on the main street in Lagarto, a city with a population of around 100,000, said Monica Horta, a spokeswoman for the Federal Police in Aracaju, the capital of Sergipe state.
Two months ago, the judge levied a daily fine on Facebook of $12,600, raising this to $254,000 when the data was not supplied. Frustrated, police requested the order for Dzodan's arrest.
"There's technical limitations to what we can do to cooperate," Steinfeld said. "We've cooperated as much as we could."
"This information is important evidence in a criminal investigation into drug traffic," Horta said.
WhatsApp was briefly blocked in December by a judge in Sao Paulo state for failing to provide information related to a separate criminal investigation, but the ban was overturned less than 24 hours later.
The service was also nearly suspended in February 2015 after a judge in Piaui, another northeastern state, ordered its suspension for not helping a different investigation, this time into pedophilia. In this case, too, the ban was overturned - this time before it came into effect.