A woman checks her cell phone at a coffee shop in Sao Paulo, Brazil, Thursday, Dec. 17, 2015. Communicating became more complicated for some 100 million Brazilians on Thursday when a state judge order the popular messaging service WhatsApp blocked for 48 hours. The reason for the order was murky because it arose from criminal proceedings in Sao Paulo state that are kept under judicial secret. (AP Photo/Andre Penner)

WhatsApp is back online in Brazil.

A Brazilian judge on Thursday struck down a lower court ruling that temporarily ordered telecoms to block the popular messaging service, snarling communications for many of its 100 million users in Brazil for about 12 hours.

The lower court in Sao Paulo state ordered WhatsApp blocked in connection to a criminal case because it wouldn't hand over user information.

Details were murky as the case is sealed, though local media reported it concerned an investigation into Brazil's most powerful drug gang.

The original judicial order came as part of a law enforcement investigation in which Facebook Brazil was ordered to put a wiretap on certain WhatsApp accounts, according to the company. WhatsApp can't do that because it doesn't store messages sent on its service, and it encrypts all messages so that no one, including anyone at WhatsApp, can intercept or read them.

On Thursday afternoon, state judge Xavier de Souza overruled the lower court, saying in a statement that "in light of constitutional principles, it doesn't seem reasonable that millions of users are affected because of the inaction of the corporation" to hand over information to the court.

Mark Zuckerberg, who heads WhatsApp's parent company, Facebook, said in a Facebook post that the case was related to the company's attempt to guard customers' data.

"I am stunned that our efforts to protect people's data would result in such an extreme decision by a single judge to punish every person in Brazil who uses WhatsApp," Zuckerberg wrote in his Facebook post.

"Until today, Brazil has been an ally in creating an open Internet," he added. "Brazilians have always been among the most passionate in sharing their voice online."

Brazil's biggest telecoms put up scant fight against the judicial order.

In this March 25, 2015, file photo, Mark Zuckerberg talks about the Messenger app during the Facebook F8 Developer Conference in San Francisco. Brazilians awoke to a day without WhatApp Thursday, Dec. 17, 2015 after a judge ordered the popular messaging app blocked throughout the country for 48 hours.Zuckerberg, who heads WhatsApp's parent company Facebook, indicated in a Facebook post that the case was related to the company's attempt to guard customers' data. (AP Photo/Eric Risberg, File)

For months they have complained about WhatsApp, saying that they lose revenue because clients use its free services instead of using the phone companies' own text messaging. But the association representing the cellphone industry, SindiTelebrazil, denied in a statement those companies were the plaintiffs in the case.

Brazilians are among the globe's most voracious users of social media such as Facebook, WhatsApp and Twitter.

Many quickly migrated to WhatsApp's competitors. Viber said usage in the Brazilian market had grown by 2,000 percent in 12 hours, while the messaging service Telegram said over 1.5 million new Brazilian clients started using it Thursday.

Technology companies often run into roadblocks in Brazil's complicated legal system, where single judges have in the past tried to block Facebook, Google and other services for various reasons, such as failure to remove offensive posts or not handing over for investigations.

However, Thursday's block of WhatsApp appeared to be the first time a major online service was blocked nationwide.

"This is insane. It's ruining my 'secret Santa' party!'" said Caroline Largueza, as she furiously tapped away on her smartphone in a Rio de Janeiro mall.

The university student planned to meet friends to exchange Christmas presents on her school's campus, but they'd intended to consult over WhatsApp on Thursday exactly where they'd gather.

"Without WhatsApp it's extremely hard to communicate with anybody," she complained.

WhatsApp is used by nearly half of Brazil's population, according to the company.

Media outlets use it to obtain tips, photos and video from readers; families have chat groups to share snapshots of kids and organize family dinners; taxi drivers are constantly trading advice via WhatsApp on where traffic is bad and where clients are waiting.

"Today I fell ill and I am working from home. I have two WhatsApp groups with my staff," said Luciana Rego, a manager at a household care products company. "When I am out, I give all the instructions in the app, they tell me what they are doing. It's great to speed up decisions, we use it a lot. Today it is taking a long time. We went back to email."

In a statement about the lower court's order to block the service, Sao Paulo's state court system said only that California-based WhatsApp had ignored two prior judicial orders this year.

"The company did not heed the judicial decision, the public prosecutors' office requested the service be blocked," the court's statement read.