Brazil’s battle with Facebook over its encrypted messaging app, WhatsApp, continues to rage.

A Brazilian judge ordered telephone companies to cut off access to WhatsApp in the country after Facebook declined to provide chat logs related to a criminal investigation, Globo reports. Because WhatsApp messages are end-to-end encrypted, Facebook cannot access users’ messages and therefore cannot provide the court with the requested data.

However, the block was lifted several hours later by Brazil’s Supreme Court, which questioned whether the lower court’s order to ban WhatsApp was reasonable and proportionate.

This marks the fourth time a judge has ordered a block of WhatsApp in the country after being denied access to messages. The most recent block occurred in May of this year. (Update: Although four bans have been ordered, a sharp-eyed reader points out that one was successfully appealed, so only three bans have gone into effect.)

“In recent months, people from all across Brazil have rejected judicial blocks of services like WhatsApp,” a WhatsApp spokesperson said. “Indiscriminate steps like these threaten people’s ability to communicate, to run their businesses, and to live their lives. As we’ve said in the past, we cannot share information we don’t have access to.”

Previous WhatsApp bans have been ordered to last as long as 72 hours, but access has been typically restored more quickly. During this ban, telephone companies were ordered to block WhatsApp indefinitely, but the higher court’s decision undid the ban within a matter of hours.

WhatsApp celebrated the lifting of the ban. “We’re pleased that people can access WhatsApp again in Brazil,” a spokesperson said. “We hope that this puts an end to blocks that have punished millions of Brazilians and that people can continue using services like WhatsApp to stay in touch with those who matter to them.”

According to Globo, the judge in this case took offense at the way WhatsApp responded to the court’s demands, saying the company was treating Brazil like a “banana republic.” Judge Daniela Barbosa also criticized WhatsApp for responding to the court via email and in English, “as if this was the official language of this country.”

But the Supreme Court’s ruling may make it more difficult for magistrate judges to shut down WhatsApp whenever they can’t access the evidence they’re looking for. The ruling suggests Brazil’s highest court favors an open internet, even if that means embracing encryption. It’s good news for Facebook, which is testing end-to-end encryption in its Messenger app for users in Brazil and around the world.

While WhatsApp was banned, other encrypted messaging apps remain available in Brazil. However, WhatsApp is hugely popular in Brazil, with over 100 million users, so cutting access to the app has a severe impact on the nation’s communications. Users have been able to circumvent previous bans by using a VPN service, and other circumvention techniques are outlined here.

This story was updated at 2:20 p.m. to reflect that the ban has been lifted.