Brazil’s federal police have arrested four people for allegedly hacking the phone of the justice minister, Sérgio Moro, a key member of the far-right president Jair Bolsonaro’s cabinet who had previously been a renowned anti-corruption judge.

A judge ordered the arrests of Gustavo Henrique Elias Santos, Suelen Priscila de Oliveira, Danilo Cristiano Marques and Walter Delgatti Neto, who live in three different cities in São Paulo state. The judge said the group hacked the messaging app accounts of Moro, two federal judges and two federal police investigators.

The ruling issued Friday by the judge Vallisney de Souza Oliveira was made public Wednesday.

Moro, who also heads Brazil’s federal police, said on 5 June that his phone had been hacked.

Four days later, the Intercept and other media outlets started publishing reports based on leaked messaging app exchanges between Moro and prosecutors dating back to the minister’s time as a judge in a corruption investigation known as “Operation Car Wash”, which led to the arrests of many of Brazil’s business and political elite, including the former president Luiz Inácio Lula da Silva.

The judge’s ruling does not establish a direct link between the arrests and the reported exchanges.

Oliveira said in his decision: “There are strong indications the suspects formed a criminal organization to commit crimes, and joined together to violate the phone secrecy of several Brazilian authorities through the invasion of the Telegram app.”

The Intercept and its partners never revealed the source of the messages they published, which suggested inappropriate exchanges between Moro and prosecutors in the Lula case, among other exchanges. Its editors said they had already been handed the reported messages when Moro claimed he had been hacked.

But Moro said on Twitter the suspects “have criminal records, are involved in several types of crime” and they were “the source of trust to those who published the alleged messages obtained through crime”.

The judge also said the group made suspicious transactions estimated at $167,000 between 18 April and 29 June.

Moro is hailed by many Brazilians as an anti-corruption hero, but he is criticized by others that see him as an anti-leftist zealot.

His credibility as an unbiased and tough judge in the sprawling Car Wash inquiry was put in doubt after reports based on leaked messages accused him of instructing prosecutors in the Lula case, which is against Brazilian law.

Lula, who was president between 2003 and 2010, was convicted of corruption and money laundering over a beachfront apartment that prosecutors say he received from a construction company in exchange for lucrative government contracts. He denies he is guilty.

Moro does not acknowledge the veracity of the exchanges reported and insists even if they were true there would be no wrongdoing in the statements made to Car Wash prosecutors.