Long-serving Prime Minister Benjamin Netanyahu faces a potentially formidable challenge to his hard-line rule — not from Israel's civilian politicians but instead from its revered security establishment.

An extraordinary array of former top commanders are criticizing Netanyahu in increasingly urgent terms, accusing him of mishandling the Palestinian issue and allying with extremists bent on dismantling Israel's democracy.

On Tuesday, a group representing more than 200 retired leaders in Israel's military, police, Mossad spy service and Shin Bet security agency presented a plan to help end the half-century occupation of the Palestinians through unilateral steps, including disavowing claims to over 90 percent of the West Bank and freezing Jewish settlement construction in such areas.

The movement, called Commanders for Israel's Security, reflects an increasingly widespread assessment that Israel is drifting catastrophically toward permanent entanglement with the Palestinians and conflict with the world community.

"Things are getting worse and worse," said retired Maj. Gen. Amnon Reshef, the group's founder and a former commander of Israel's armored corps. "What kind of future do we have here? What are we going to leave for our kids and young children?"

Although a peace deal may not be possible at present, "still something can and should be done right now," he said

The driving narrative is that the Holy Land's 6 million Jews must find a way of detaching themselves from the roughly equivalent number of Arabs, most of whom live in the West Bank and Gaza and do not have voting rights in Israel.

Without the establishment of a Palestinian state, the argument goes, Israel will either eventually have to extend voting rights, formally absorbing the Palestinians in the occupied territories and destroying itself as a Jewish-majority country, or else be branded a non-democracy destined to suffer comparisons to South African apartheid and risking a similar fate.

Surveys among youth around the world, even in the U.S., suggest that cliff is coming.

Netanyahu and his Cabinet have shown little interest in changing course.

He does profess a theoretical desire for a two-state solution. But in practice, his government busies itself with the Palestinian leadership's shortcomings — publicizing incidents of "incitement" against Jews is a frequent theme — while continuing to settle territory, occupied in the 1967 Mideast war, where the Palestinians hope to establish a state.

Following years of failed peace efforts and occasional violence, Israel pulled troops and settlers out of the Gaza Strip in 2005. But in the West Bank, hundreds of thousands of settlers receive an array of subsidies and privileges in what is in effect an Israeli colony. The Palestinian majority there does not have Israeli citizenship and lives under a mix of limited autonomy and Israeli military rule.

The view that this is corrosive is becoming overwhelming across the country's established classes: Leaders in academia, the legal system, the media, business and the arts seem increasingly agitated by the prospect of permanent attachment to millions of restive, politically disenfranchised Palestinians.

The feeling of urgency comes from repeated failures to dislodge Netanyahu, who last year won a third straight election with strong support from the country's poor, working-class and religious sectors. With over a half-million settlers already in place, critics fear, a partition will soon be impossible.

Netanyahu and his supporters have had a fairly easy time fending off opponents, however prominent, dismissing them as "leftists" naive about the security imperative of territory in a tough Middle East.

His base, if anything, shares the distrust of experts and elites increasingly visible in the developed world, as evidenced by the rise of Donald Trump in the United States and last week's passage of Britain's proposal to leave the European Union.

David Bitan, the chairman of Netanyahu's parliamentary coalition, tried to use this tactic last weekend. "Something happens to people when they become Mossad and Shin Bet directors. They turn into leftists," he said. Opposition politicians countered that the security heads are hard-headed realists who base their assessments on facts.

One of the first signs of the trend was a 2012 documentary called "The Gatekeepers," in which all six then-living heads of the Shin Bet internal security agency appeared to agree that the occupation of the West Bank is not sustainable.

In last year's election, one of the most compelling voices against Netanyahu's approach to the Palestinians came from now-deceased former Mossad chief Meir Dagan, famed for his tough-guy credentials. Earlier this year, the deputy military chief, Maj. Gen. Yair Golan, kicked up a fuss by appearing to compare the nationalist stirrings in Israel to 1930s Germany.

More recently, former military chief Moshe Yaalon, who was ousted as Netanyahu's defense minister weeks ago, has placed the prime minister in his crosshairs.

Yaalon, one of the few top security figures associated with Netanyahu's Likud Party, has declared his intention to challenge him. He travels the country lambasting what he calls the government's anti-liberal policies — a reference to efforts to undermine Israeli-Arab lawmakers, curb critical NGOs, compel artists to toe the line through funding, and limit the power of the relatively liberal Supreme Court.

In a striking one-two punch, Yaalon was joined at a major security conference recently by ex-Premier Ehud Barak, who attacked Netanyahu for blundering toward a binational state "which will be an apartheid state" with an eventual Jewish minority and "a high likelihood of drawn-out civil war." Barak, himself a former military chief, said the government was planting "seeds of fascism" and should be toppled "via popular protest and via the ballot box before it's too late."

Two other former army chiefs, Gabi Ashkenazi and Benny Gantz, have formed a movement that plans to criticize Netanyahu on social issues.

Uri Savir, a dovish former peace negotiator, wrote in a column this week that former security chiefs overwhelmingly support the two-state solution. With the civilian Israeli opposition so weak, an ex-military man is the best hope for replacing Netanyahu, he said.

He called the situation "an unprecedented emergency" in which "there probably is no choice ... but to allow retired generals to save democracy."

The criticism of Netanyahu is not necessarily driven by the idea he is missing an opportunity for peace. After years of failed negotiations, there is little hope left among Israelis that they can come to an amicable divorce by agreement. The Palestinians' demands — including a division of Jerusalem and the "right of return" to Israel of Palestinian refugees and their descendants — are too much for Israel and not about to change.

That realization has shifted the discourse in Israel away from peace and instead to finding another way to impose a partition.

Complicating the picture is that the Gaza pullout ended badly from Israel's perspective: Hamas militants took it over, leading to three wars between the sides.

Former top Mossad official Rolly Guerin said at Tuesday's launch that past failures did not give Israel the "luxury" of standing still: "Time is of the essence," he said.