A Brazilian judge told operators to block WhatsApp for 48 hours, after the messaging firm refused to comply with a court order dating back to July.

SindiTelebrasil, the Brazilian phone company association, received the court order on Wednesday (16 December) afternoon to block WhatsApp’s messaging and internet voice service. Access to the app was shut down at midnight.

The case involves a drug trafficker who allegedly used WhatsApp and who is linked to a Sao Paulo criminal gang, according to a local TV station, as reported by Reuters.

The court said WhatsApp failed to comply with a judicial order issued on 23 July, and was fined on 7 August for non-compliance. Finally, on 16 December, Judge Sandra Regina Nostre Marques ordered the shutdown.  It is thought that WhatsApp was unwilling to give up user data to the authorities.

Mark Zuckerberg, CEO of Facebook, which owns WhatsApp, said he was “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”, adding that “we are working hard to get this block reversed.”

He also said more than 100 million people rely on WhatsApp in Brazil and that until now, the country had been an ally in creating an open internet.

He said Facebook Messenger can be used as an alternative in the meantime.

Jan Koum, CEO of WhatsApp, said in a statement on Facebook that the company was “disappointed in the short-sighted decision to cut off access to WhatsApp, a communication tool that so many Brazilians have come to depend on, and sad to see Brazil isolate itself from the rest of the world.”

In 2013 Brazil positioned itself as a champion of net neutrality as it passed an internet bill of rights that limited the monitoring of its citizens. However, according to The Verge, there are moves to push back against the legislation.

Brazilian phone companies have unsuccessfully tried in the past to get the government to limit free WhatsApp calls, arguing it is unregulated and illegal.

Meanwhile, competitor Telegram, which WhatsApp has blocked links to, announced on Twitter that on Thursday alone it got 1 million new users from Brazil.