RIO DE JANEIRO - A judge on Tuesday suspended the WhatsApp smartphone messaging service across Brazil, where it is hugely popular, for failing to surrender user data in a police investigation, the court in Rio de Janeiro said.

"WhatsApp is blocked across the whole national territory," a spokesman told AFP. WhatsApp, owned by Facebook, has clashed several times with Brazilian courts after refusing to give access to police. The 19-page court ruling said Brazilian telephone operators must "immediately suspend" WhatsApp services.

Facebook must comply with an order to turn information over to a police investigation, or would face fines of 50,000 reais ($15,265) a day, the court said.

The president of the national telecoms' union, Eduardo Levy, told G1 news site that the blockage would take effect at 2:00 pm (1700 GMT). In a statement, WhatsApp called the measure an "indiscriminate" threat to "people's capacity to communicate, to run their businesses and live their lives."

The company said it would appeal.

This was the fourth court-ordered suspension of WhatsApp since February 2015.

The long-running dispute pits Brazilian authorities' insistence that they need access to communications between alleged criminals against Facebook's argument that it is protecting privacy and freedom of communication.

The last time, in May, the blockage lasted a day and was lifted after a second appeal.

The shutdown angered users reliant on the free app in Brazil, where cell phone fees for texting and calls are high and where WhatsApp's group chat and image-sharing functions have become embedded in everyday social interaction.

Billionaire Facebook CEO Mark Zuckerberg called the May shutdown "very scary in a democracy."

But in the latest ruling, Judge Daniela Barbosa said Facebook was being irresponsible by refusing "to provide information that will be critical to the success of an investigation and later to bolster the criminal case."

Barbosa said Facebook had been issued with three requests to provide messages to police investigating a case in Duque de Caxias, north of Rio de Janeiro. The nature of the case was not given.

She also harshly criticized Facebook for responding to the Brazilian police requests with a list of questions demanding more information that were presented in English, treating Brazil "like some small republic."

The judge said those mourning loss of WhatsApp "should remember that the main victim of the crimes being investigated is society itself, with the certainty that all the time new victims are being created and new crimes are being committed while the judiciary is unable to stop the incidents or punish those responsible."

WhatsApp is estimated to be used by 100 million Brazilians, making Brazil the second biggest user country after South Africa, according to data cited by the court.