By Brad Haynes

SAO PAULO (Reuters) - A Brazilian judge ordered an indefinite suspension of Facebook Inc's WhatsApp on Tuesday after it failed to cooperate in a criminal investigation, the third such incident involving the popular phone messaging app since December.

The office of Judge Daniela Barbosa Assunção de Souza in the state of Rio de Janeiro said the order, affecting more than 100 million users throughout Brazil, will be lifted once Facebook surrenders data. She withheld details of the confidential case.

WhatsApp stood by its defense that encrypted messages sent over the app are not stored on its servers, an argument that has won out on appeal, quickly reversing recent blockages that still show the vast discretionary power of Brazil's lower courts.

"As we've said in the past, we cannot share information we don't have access to. We hope to see this block lifted as soon as possible," said a WhatsApp spokesperson in a public statement.

The office of Brazil's attorney general reiterated its position that judges who suspend WhatsApp are incorrectly interpreting a 2014 law meant to provide a legal framework for the internet.

Still, that guidance has not stopped judges frustrated with the modern limits of wiretaps in drug-trafficking investigations from going after the service and even briefly jailing a senior Facebook executive in March.

Representatives of the five Brazilian carriers ordered to block WhatsApp - Telefonica Brasil SA, América Móvil SAB's Claro, TIM Participações SA, Oi SA and Nextel Participações SA - did not have an immediate comment.

(Reporting by Brad Haynes; Additional reporting by Alberto Alerigi Jr and Guillermo Parra-Bernal in Sao Paulo, Rodrigo Viga Gaier in Rio de Janeiro; Editing by Cynthia Osterman)