Prime Minister Benjamin Netanyahu had an applause line that should have brought the house down in his speech at Wednesday’s official ceremony celebrating 50 years of settlement in Judea and Samaria, the Jordan Valley and the Golan Heights.

Netanyahu was speaking before a crowd of thousands in Gush Etzion, which was destroyed by the Arab Legion in the War of Independence, and rebuilt by the children of its massacred defenders immediately after the area was liberated in the 1967 Six Day War.

Netanyahu pledged to the audience: “There will be no more uprooting of settlements in the Land of Israel.”

He did receive enthusiastic applause. But he didn’t bring the house down. And the rest of his speech was met with a lukewarm reception overall, even though he hit all the notes.

And that makes sense. As much as the audience wanted to believe him and his pledges to continue to build in the biblical and strategic heartland of the country, they couldn’t.

They knew that under the current legal regime governing the country, it’s not for elected officials to say whether communities will be built or destroyed.

That’s up to the Supreme Court, whose justices have seized the power to determine any aspect of Israeli law and policy that they wish. And the Supreme Court, under retiring President Miriam Naor, was boycotting the official state ceremony.

Naor’s decision to cast to the seven winds official protocol, which dictates that a representative of the court is present at all state ceremonies was not automatic. First she had agreed to send a justice to the ceremony. But after she received a request from the radical Meretz party to reconsider her decision, she revoked it.

The ceremony, she insisted, was “controversial.”

And so, the same justice who participated both in the official ceremony to mark the reunification of Jerusalem earlier this year and in a conference sponsored by radical, anti-Israel groups last December, announced that no representative of the High Court would attend.

Naor’s decision to side with Meretz, with its five-member Knesset faction, and ignore 70 years of protocol, was not an isolated event.

Over the past several weeks, the court has published an avalanche of radical decisions that both separately and together represent what many experts are referring to as a second judicial revolution.

The first judicial revolution was carried out in the 1990s by then-Supreme Court president Aharon Barak. Based on his dubious interpretation of Basic Law: Human Dignity and Liberty, which was passed in 1992 by an uninterested Knesset, (only 53 out of 120 Knesset members participated in the vote), Barak seized the power to overturn Knesset laws.

Barak’s interpretation of the Basic Law, along with his radical rulings that gave standing to parties unaffected by the substance of their petitions to the Supreme Court acting as the High Court of Justice, initiated his judicial revolution. That revolution rendered the court the most powerful arm of government, with neither the Knesset nor the executive branch able to check or balance its growing power.

Until their recent decisions, like Barak, his successors have been careful to maintain at least a conceit that their rulings are based in Israeli law.

The recent rulings signal that the justices no longer feel constrained to do so.

Among other things, the court ruled that the legislature and the executive branch have no right to interpret the Basic Law governing the state budget to enable them to pass a two-year budget. In doing so the court paved the way for it to cancel Basic Laws, which are supposed to have constitutional standing.

The court canceled a law instituting a special tax on people who own more than two apartments.

The ruling did not discuss the merits of the law.

Rather, the justices canceled the law because they claimed that lawmakers didn’t debate it for long enough before they passed it into law. In other words, the court gave itself the right to cancel laws on procedural rather than substantive, legal grounds.

The court ruled that the law enabling the government to deport illegal aliens to third countries cannot be enforced unless the illegal alien agrees to leave. Thus the court ruled the government has no right to enforce Israel’s immigration laws and the Knesset has no right to legislate immigration laws.

The court ruled that the interior minister’s lawful power to remove a person’s residency rights is unenforceable in relation to Jerusalem residents, members of the Hamas terrorist group, who have been elected to serve as Palestinian lawmakers in the Palestinian Legislative Council.

In other words, the court decided that the 1952 law is illegal because the justices think it ought to be illegal.

The court canceled the Knesset law governing the draft of ultra-Orthodox Israelis because the justices thought it wasn’t strict enough.

None of these rulings was based on standing law. Indeed, they weren’t really based on law at all. And as incoming Supreme Court President Esther Hayut made clear this week, the absence of legal grounds for court rulings is not coincidental.

In a speech before the Bar Association, Hayut compared the justices to God.

In her words, “There’s a disadvantage that we flesh and blood judges have in comparison with the Creator of the Universe. Even in the situations where we understand fairly quickly the dilemma that brought the petitioners before us, it often happens that the solution we view as just and proper isn’t possible under the practice and requirements of the law. These situations in my view are among the most difficult and complex ones that we as judges are called upon to contend with.”

Hayut continued, “How do we bridge between the law and what is right? Finding an answer to this question, discovering the secret… ‘spice’ is perhaps one of the greatest tasks that lies before us as judges.”

Given her colleagues’ recent judgments, Hayut’s intentions are self-evident. Her court will abandon the law whenever it contradicts the justices’ sense of what is right. And given the ideological uniformity of the court, its justices’ sense of right will always be in alignment with Meretz, which will never, ever win a national election.

Which brings us to Turkey.

Until Turkish President Recep Tayyip Erdogan’s AKP won its first parliamentary election in 2002, Turkey was a semi-democracy. Turkish voters elected their parliament and their president.

But the powers of both were checked by the military. The generals were constitutionally required to unseat any politicians who in any way endangered Turkey’s secular character.

Less than 15 years after Erdogan and his AKP first rose to power, the military was gutted, its constitutional power erased. But so was Turkey’s semi-democracy, and its secular character.

Erdogan today is a dictator. And Turkey grows more openly Islamist every day.

The thing of it is that Turkey had no democratic history. That is why the framers of its constitution inserted the military as the guardians of Turkish secularism, to protect it from the Islamist and anti-democratic impulses of the public.

As for the military, the generals really did confine their interventions in politics to instances where the generals were convinced Turkey’s secular order was endangered.

The situation is Israel is different in both regards.

The citizens of Israel have never wanted or supported anything other than democracy. There is no chance that this will ever change. Indeed, the public’s devotion to democracy has grown since Barak instituted the first judicial revolution 25 years ago.

As for the justices, unlike the Turkish generals, they intervene in every aspect of Israeli life that they wish. They recognize no limits on their power. They reject the questions on actuarial exams. They rule that entire communities must be destroyed or built. There is nothing to stop them from ruling that the government has no right to order the IDF to go to war. And indeed, given their current power grab, there every reason to assume that such a decision is possible.

In an attempt to curb the court’s power, this month Education Minister Naftali Bennett and Justice Minister Ayelet Shaked introduced a bill they claim will do the trick. The Bennett-Shaked bill would amend the Basic Law: Knesset in a manner that would enable the Knesset to override Supreme Court decisions to cancel legislation.

There are several problems with the bill.

First, it is too limited. The justices have not only seized the Knesset’s power to pass laws. They have seized the government’s power to execute laws.

Unless that is also dealt with, the Supreme Court will continue to rule without checks or balances.

Then, too, if the proposed amendment goes through, it will actually empower the court.

Again, Barak had no legal basis for his arrogation of the power to cancel duly promulgated laws. If the Bennett-Shaked bill passes, it will provide the court with the legal power it lacks and so render his revolution irrevocable.

Finally, as Hayut said, and as recent court decisions show, the court is no longer interested in Knesset laws. Moreover, it has seized the right to cancel Basic Laws. Consequently, it will not hesitate to overrule and cancel the Bennett-Shaked amendment of the Basic Law: Knesset.

To abrogate the court’s actions and restore Israeli democracy, the Knesset and the government cannot adopt half measures. They must amend the Basic Law: Judiciary, to deny the court the right to cancel laws.

They must institute regulations, and if necessary pass laws, that require the High Court of Justice to base its rulings on evidence.

The Judicial Selection Committee, which enables justices to appoint themselves, must be shut down. The power to select judges must be transferred to the government. The Knesset must be empowered to approve judicial appointments.

The government and Knesset must end the court’s effective control over the attorney-general, the state prosecution and the legal advisers of the government ministries and the Knesset.

To this end, all appointments of senior counsels must be the prerogative of the government, the relevant minister or in the case of the Knesset, of the speaker of the Knesset. The appointments must be final and not susceptible to court challenge.

Finally, Barak’s assertion that “Everything is justiciable” must be rejected either in legislation or through Justice Ministry regulations. To petition the court, petitioners must demonstrate that they are directly affected by whatever it is they are petitioning against.

This then returns us to the official ceremony at Gush Etzion on Wednesday evening. Given the speed of the court’s seizure of powers and its open ideological alliance with Meretz, if the Knesset and the government do not act immediately to end the Supreme Court’s escalating judicial coup, 10 years from now there won’t be a ceremony to mark 60 years of settlement in Judea and Samaria, the Golan Heights and the Jordan Valley.