(Adds quotes from legal experts, details of case, precedents)

By Brad Haynes

SAO PAULO, March 1 (Reuters) - Brazilian police arrested a senior Facebook Inc executive on Tuesday as a dispute escalated over a court's demand that the company provide data from its WhatsApp messaging service to help in a secretive drug-trafficking investigation.

Court officials in Sergipe state confirmed that a judge had ordered the jailing of Facebook Vice President for Latin America Diego Dzodan. Federal police in Sao Paulo state said he was being held there for questioning.

Law enforcement officials withheld further information about the nature of their request to the messaging service that Facebook Inc acquired in 2014, saying that doing so could compromise an ongoing criminal investigation.

The arrest, which Facebook called an "extreme and disproportionate measure," came as social media and Internet companies face mounting pressure from governments around the world to help them eavesdrop on users and filter content.

Arrests of officials from social media companies are extremely rare, though not unprecedented, because the companies typically comply with local court orders, especially from countries where they have branch offices.

"Precisely because these large global Internet companies have staff in many countries who are vulnerable to legal action including arrest and criminal charges, they generally do comply with legally binding requests from authorities for user data or to remove or block content in those countries where they have 'boots on the ground,'" said Internet freedom activist Rebecca MacKinnon.

Prior to its acquisition by Facebook, California-based WhatsApp had less skin in the game in disputes with governments outside the United States because, unlike Facebook, it did not have staff scattered around the globe.

"WhatsApp is a company that was started very focused on U.S. laws," said Internet law attorney Marcia Hoffmann. "Now that it's owned by a company with people and resources in other countries, there is more leverage for those governments to put pressure in new and in different ways. Arresting executives is one of them."

While details of the case remain murky, court officials said the judge in Brazil resorted to the arrest after issuing a fine of 1 million reais ($250,000) to compel Facebook to help investigators access WhatsApp messages relevant to their drug-trafficking investigation.

That is likely impossible because WhatsApp began using end-to-end encryption technology in 2014 that prevents the company from monitoring messages that travel across its network, said Christopher Soghoian, principal technologist with the American Civil Liberties Union.

"They are using technology to try to take themselves out of the surveillance business," Soghoian said.

The arrest surfaced as Apple Inc finds itself at odds with the United States government on similar grounds.

U.S. prosecutors want the company to build a software tool to help investigators unlock the iPhone used by one of the shooters in the San Bernardino, California, attacks. Apple has refused, saying it would set a dangerous precedent that would make its customers vulnerable to spying.

Privacy concerns have previously put Facebook at odds with Brazilian law enforcement seeking evidence in criminal cases, although the confrontations rarely rise to the prominence of Apple's current standoff with the U.S. authorities.

In December, a judge suspended Facebook's popular WhatsApp phone-messaging service in Brazil for about 12 hours after it failed to comply with two court orders to share information in a criminal case.

Brazil passed an Internet law two years ago aimed at streamlining thorny legal issues, but lower courts still have vast discretionary powers according to legal expert Ronaldo Lemos, a chief architect of that 2014 law.

"The court of appeals tends to be more sensitive in these cases, but the lower courts are still tough, as today's decision shows," said Lemos.

($1 = 3.93 Brazilian reais) (Reporting by Brad Haynes; Additional reporting by Jim Finkle, Jonathan Weber, Cesar Bianconi and Maria Pia Palermo; Editing by Daniel Flynn and Tom Brown)