Prime Minister Benjamin Netanyahu is convinced the Supreme Court is part of a judicial “deep state” out to finish him politically and send him to prison. He is threatening to sink the coalition talks with Kahol Lavan if Benny Gantz doesn’t offer him a safety net to sidestep the High Court of Justice which, the premier is saying in private conversations, will try to get rid of him.

“Let there be no doubt, the High Court will take the opportunity to oust me,” Netanyahu himself says in these conversations. He warns that if the court prevents him from being prime minister, or if a law is enacted banning him from running for the post in the future, a civil rebellion will erupt. “Masses will take to the streets,” he predicts. “There will be a call to boycott the election.”

Netanyahu’s relations with the Supreme Court have changed. During his second term as prime minister, court President Dorit Beinisch invited him to a private meeting with the justices. At the time he liked to cite favorably Montesquieu’s theory on the separation of powers and he maintained good relations and an open line with Beinisch.

When his faithful protégé Yuval Steinitz lashed out at the Supreme Court’s rulings, the prime minister told Beinisch he did not agree with Steinitz’s attacks and that he had full confidence in the justice system. Beinisch and her husband were invited several times to dinner at the Prime Minister’s Residence.

But Netanyahu had another reason to take Beinisch’s side. He believed they had a common enemy: Yedioth Ahronoth publisher Arnon Mozes, who wanted to get rid of both of them with systematic attacks in his media outlets. For Netanyahu, this was good reason for an alliance, albeit temporary.

At that time Netanyahu thwarted every attempt to undermine the justice system’s status and swiftly renounced the right’s assaults on the High Court in public statements. In 2011, when Yariv Levin and Zeev Elkin advanced a proposal obliging Supreme Court candidates to be vetted by the Knesset, it took one call from Attorney General Yehuda Weinstein for Netanyahu to instruct Justice Minister Yaakov Neeman to remove the motion from the agenda.

“It shall not be,” he announced. “Such a bill will not be passed in a government headed by me. The court’s independence is above everything. I sanctify the separation of powers and the rule of law.”

Since then, the sanctity of these values for Netanyahu has diminished. The first cracks appeared in the Elor Azaria case, when the prime minister realized his base expected him to embrace “the son of all of us.” Netanyahu’s media adviser Boaz Stembler testified in the Walla-Bezeq bribery case how the prime minister was furious and didn’t speak to him for a week because he had persuaded him to denounce Azaria’s fatal shooting of a gravely wounded Palestinian assailant in Hebron.

The investigations and indictments against Netanyahu made him turn his back on the rule of law once and for all.

The police, prosecution and even the court, whose independence he had sworn to protect, became worse enemies than Iran, Barack Obama and even Noni Mozes.

Politicians who talk to Netanyahu are surprised to discover how similar his description of the legal system is to the most extreme attacks voiced by his supporters on social media.

As far as Netanyahu is concerned, the “High Court of Justice saints,” as he contemptuously calls the justices in private conversations, are part of a jurists’ underground that has resolved to finish him politically and send him to prison.

At the head of his imaginary “deep state” is an 83-year-old man, former Supreme Court President Aharon Barak. Barak retired almost 15 years ago, but the prime minister is convinced he’s still pulling the strings of court President Esther Hayut, Attorney General Avichai Mendelblit and even Gantz and his party ally Gabi Ashkenazi. The premier tells himself and those around him that he and Aharon Barak are engaged in an ideological battle and that his rival wants to get rid of him in order to change Israel from a Jewish state into a state of all its citizens.

Once, in Netanyahu’s statesmanlike phase, the bitter enemy was a welcome guest at the Balfour residence. Under questioning in the Walla-Bezeq case, Netanyahu claimed in his defense that he hosted Shaul and Iris Elovitch at the residence as many times as “Barak and his wife were guests here.”

Now, as Haaretz reported, Netanyahu is threatening to blow up the negotiations with Kahol Lavan because Gantz won’t give him a safety net in the form of legislation overriding the High Court of Justice, in case the court rules that he cannot continue in office.

Unless an emergency government is formed, Netanyahu has two options: to try to form a narrow government or go to a fourth election.

“The High Court is still a threat, but if Netanyahu wins 40 Knesset seats in an election, as the polls predict, do you really think the High Court won’t be afraid to intervene?” his confidant asks.

Others believe a broad coalition will establish Netanyahu’s legitimacy and make it difficult for the court to rule against him. One way or another, Netanyahu sees the biggest political threat to his remaining in power not in the Knesset but in the court.