JERUSALEM — An Israeli court on Monday released four of seven suspects held in a high-profile corruption case involving Prime Minister Benjamin Netanyahu's inner circle, amid an uproar over a judge apparently discussing their detention with an investigator in private.

Israeli media reported late Sunday that Tel Aviv Magistrate Court Judge Ronit Poznanski-Katz and securities investigator Eran Shaham-Shavit exchanged text messages discussing extending the detention of several suspects in the investigation involving Israel's telecom giant Bezeq and the close confidants of Netanyahu. Poznanski-Katz was removed from the case after critics decried the exchange as an obstruction of justice, and Netanyahu backers pounced on it as part of their claim that the authorities were out to get the long-time premier.

Last week police arrested seven suspects for their alleged involvement in the promotion of regulation worth hundreds of millions of dollars to Israel's Bezeq telecom company in return for Bezeq's popular news site, Walla, allegedly providing favorable coverage of Netanyahu and his family.

Former Netanyahu media adviser Nir Hefetz and Shlomo Filber, the former director of the Communications Ministry under Netanyahu, were arrested, as well as Bezeq boss Shaul Elovitch, his son and his wife and two top Bezeq executives. Hefetz, Filber and Elovitch remain in custody.

Filber, one of the closest people to Netanyahu, has reportedly turned state witness and will incriminate Netanyahu in the affair.

But the sense of peril to Netanyahu's rule took a step back Sunday, with the evening news report Sunday about the illicit conversation. Shortly after, the head of the Tel Aviv Magistrate Court removed Poznanski-Katz from the case, and the justice minister and Supreme Court president jointly requested an investigation into the report. Netanyahu allies are calling for a criminal investigation into possible breach of trust and obstruction of justice by the judge and prosecutor.

The defense attorneys for the suspects in the case demanded their immediate release. On Monday, the Tel Aviv court ordered Elovitch's son released from custody, and released Elovitch's wife and the two Bezeq executives to house arrest.

The judge and prosecutor's exchange on the WhatsApp messaging service appeared to play into Netanyahu's claims that police investigations into his alleged corruption were part of a witch hunt by the media and law enforcement. Coalition whip David Amsalem, a member of Netanyahu's ruling Likud party, told Israel's Army Radio on Monday that the police were "obsessively" chasing after the prime minister and called for an investigation into the justice system.

Netanyahu is not directly implicated in the Bezeq corruption case, also known as Case 4000, but is expected to be questioned by police on the matter later this week. Police have recommended indicting Netanyahu on corruption charges in two other cases, one involving accepting gifts from billionaire friends, and the second over trading positive media coverage for advantageous legislation for a newspaper.

The prime minister has denied any wrongdoing.