WhatsApp Brazil
A screen shot of the popular WhatsApp smartphone application is seen after a court in Brazil ordered cellular service providers nationwide to block the application for two days in Rio de Janeiro, Brazil, on 17 December, 2015.Yasuyoshi Chiba/AFP/Getty Images

A Brazil court has ordered local telecommunications companies to block access to Facebook's popular messaging service WhatsApp for 72 hours, the second nationwide blackout in five months. The shutdown is the result of a dispute over access to encrypted data in an ongoing case involving an organized crime and drug trafficking investigation in a Brazilian state court.

The decision by Judge Marcel Maia Montalvão in the northeastern state of Sergipe applies to the Latin country's five main wireless operators who will face a daily fine of 500,000 reals ($140,000, £97000) if they do not comply. The judge ordered WhatsApp to turn over chat records to aid in a drug investigation. The company, however, argued that they cannot access the chats due to the app's encryption system and, therefore, cannot provide the required records.

Montalvão also ordered the arrest of Diego Dzodan, the vice president of Facebook's Latin America operations, for not complying with similar orders to turn over WhatsApp information in a judicial case in March.

The court has been seeking data from WhatsApp to aid in the investigation. Diego Dzodan, a Facebook executive, was briefly taken into custody in March for refusing to comply with orders to turn over WhatsApp information in the case. Dzodan was briefly detained for 24 hours before a higher court judge ruled that it was "unlawful coercion".

In a statement, WhatsApp said the company is "disappointed at the decision" and "punishes more than 100 million users who depend upon us to communicate themselves, run their business and more, just to force us hand over information that we don't have".

The ruling is the latest in a series of legal tussles between the tech giant and the Brazilian government. In December, a judge in São Paulo ordered a block on WhatsApp for 48 hours for the company's refusal to comply with a police investigation's eavesdropping requests in a different criminal drug case. An appeals court lifted the ban after just 12 hours.

Facebook Chief Executive Mark Zuckerberg sharply criticised the December ban calling it "a sad day for Brazil".

The ban also fuels the growing debate between tech companies and law enforcement regarding the trade-off between security needs and privacy. The FBI and Apple were recently embroiled in a legal conflict for months over unlocking an iPhone used by San Bernardino shooter Syed Farook. Apple's refusal to do so resulted in widely covered and debated stand-off until the FBI found an alternative way to access the iPhone 5.

Encrypted messaging service and WhatsApp's rival Telegram reported more than a million new signups after the WhatsApp ban took place.

Purchased by Facebook in 2014, WhatsApp is the most popular messaging app in Brazil, used by about half of the country's 200 million people to avoid hefty cell phone charges.