Shlomo Filber, a confidant of Prime Minister Benjamin Netanyahu who was arrested by the police in an investigation into the ties of Israel’s telecom giant with government officials, reached a deal with the police late on Tuesday to turn state's evidence. According to the deal, Filber will incriminate Netanyahu in exchange for a lighter sentence.

Filber, the former director general of the Communications Ministry under Netanyahu, is suspected of granting financial benefits to Shaul Elovitch, the controlling shareholder of Bezeq, Israel's largest telecom company, on behalf of the prime minister. In return, police suspect Elovitch skewed coverage on the Walla news website he owns to favor Netanyahu and his wife, Sara.

>> Bibi bombshell explained: Your guide to the Netanyahu cases >>

As part of the agreement made late Tuesday night, Filber offered police a detailed account of everything he knows about Netanyahu's part in the so-called Case 4000, as well as others involved in the affair. According to the deal, Filber will not receive jail time.

Filber's testimony is likely to establish the nature of the compensation given by the prime minister for the slanted coverage he received on Walla.

In May 2015, two days after the swearing in of the government, Netanyahu ousted Communications Ministry Director General Avi Berger, and appointed Filber, who had been his confidant for years, to replace him.

Already on his first day in office, Filber met with Elovitch and changed the ministry's viewpoint in favor of the business mogul. Eventually, when the State Comptroller investigated the affair, he feared that Filber had found himself in a situation of "regulatory captivity," a kind of secret agent of Bezeq in the Communications Ministry.

In August, Filder, under investigation by the Securities Authority, Filber said he would not testify against Netanyahu. Asked by Channel 2 News whether Netanyahu instructed him to act in favor of Bezeq, Filber said he "never talked to him about these things. This subject never came up in our conversations."

The Securities Authority, which later investigated Filber, recommended to prosecute him. Now, Filber may testify that he was not operating on his own behalf, but as Netanyahu's emissary.

Filber was arrested on Sunday on suspicion of bribery, fraud, breach of trust and obstruction of justice.

Earlier Netanyahu said in response to the reports: “What has happened over the last two days is simply that the world has gone mad. It’s a scandal. They’ve brought two delusional, false allegations as part of a campaign of persecution against me and my family that has been going on for years already.

“First, regarding Bezeq: All decisions on Bezeq were made by professional committees, by the professionals, under close legal supervision. There’s no Wild West here. There are no private decisions. All decisions are transparent and subject to oversight. Therefore, the claim that I worked to benefit Bezeq at the expense of substantive considerations is simply and fundamentally absurd.

“As for the second claim, which is no less delusional and no less malicious, regarding the appointment of the attorney general: I never spoke to Nir Hefetz on this issue, he never proposed anything to me on this issue, and you know what? I don’t believe he raised this possibility with anyone.”