The years-long diplomatic effort to integrate Israel as an accepted neighbor in the Middle East collapsed this week, with the expulsion of the Israeli ambassadors from Ankara and Cairo, and the rushed evacuation of the embassy staff from Amman. This is the lowest point in Israeli foreign policy since the groundbreaking visit to Jerusalem by Egyptian President Anwar Sadat in 1977. The region is spewing out the Jewish state, which is increasingly shutting itself off behind fortified walls, under a leadership that refuses any change, movement or reform and is dealing with debacle after debacle.

The talk about peace has given way to threats of war. In Cairo, the prime minister of Turkey, Recep Tayyip Erdogan, this week celebrated his country's return to the leadership of the Middle East, nearly a century after General Allenby and his troops expelled the Ottomans from here. He exploited his visit to tighten the ring around Israel and warned, in his sonorous voice, "Israel's aggression is endangering its future."

Even King Abdullah II of Jordan, the most moderate of the Arab states and an ally of the Zionist movement since pre-state times, joined the threat mongers: "Jordan and the future of Palestine are stronger than Israel; it is the Israelis who are worried today ... Your situation is more difficult than ever," the king told an Israeli acquaintance in the United States.

Next week, Israel is likely to suffer another diplomatic setback, perhaps the most crushing in its history, when the Palestinian Authority asks the United Nations to declare that it is a state. The wording of the declaration and the procedures have not yet been finalized: with or without a mention of the 1967 boundaries; via the Security Council, where there will be an American veto, or at the General Assembly, where the Palestinians are assured of a huge majority - but only for a "depleted" state, which is not a full member of the United Nations.

The list of naysayers and abstainers is also not finalized: Will Israel remain alone with the United States, Canada and Micronesia, or will it be able to persuade a few European countries to support it and thus be able to argue that it lost on points, but not by a humiliating knockout?

The truth is that all this doesn't matter. The political reality will be decided in the alleys of the Old City of Jerusalem, the hills of the West Bank and along the border with the Gaza Strip - not in Washington or New York. A UN resolution in favor of the establishment of a Palestinian state will confer international validation, not to say urgency and encouragement, on the Palestinian national-liberation struggle to cast off the yoke of the Israeli occupation and the settlements. That is what "the world" wants; this is where Erdogan, King Adbullah and the demonstrators in Amman and Cairo are aiming, while behind them lurks U.S. President Barack Obama, who is ostensibly making an effort to avert a crisis with 11th-hour diplomatic tools, but has made do with sending low-level envoys on hopeless missions.

Israel is entering the looming confrontation with the Palestinians isolated, weak and abhorred by the international community. Prime Minister Benjamin Netanyahu is now having to pay the price for the changes in the Middle East: the decline of the American superpower, the rise of Erdoganist Turkey, Iran's progress in its nuclear project and the empowerment of the masses in the Arab states. Netanyahu and the heads of the defense establishment are trying to reassure the Israeli public that the army is ready to deal with the marches and processions in the West Bank, with vast sums having been invested in nonlethal means to disperse demonstrators.

In the face of Erdogan's aggressive statements, Netanyahu went on a tour of the Egyptian border with military correspondents and promised to accelerate the fortification of the barrier there. Digging in, becoming more insular, not budging - that is the essence of the prime minister's policy.

Netanyahu is not responsible for the strategic changes in the region and did not want them. He would have preferred for the old order to remain in place forever, for Hosni Mubarak to be safely ensconced in his seat, for Turkey to return to secular Kemalism and for America to preserve its hegemony in the region, preferably under a Republican president. (Naturally, Netanyahu is fond of Mitt Romney, who worked with him in the Boston Consulting Group at the start of both their careers. Netanyahu had just graduated, Romney was already a manager. He also admires Romney's economic policy. )

Netanyahu demonstrated utter passivity in the face of the dramatic changes in the region, and allowed his rivals to seize the initiative and set the agenda. All the decisions he made were reactive. Obama pressed him, and Netanyahu declared his support for "two states for two peoples" and froze construction in the settlements for 10 months. Erdogan sent a flotilla to Gaza; Netanyahu sent the naval commandos for a lethal intercept of the vessels. The Egyptian masses demonstrated in Tahrir Square, and Netanyahu asked the Western states to save Mubarak. The terrorist organizations in Gaza launched a major attack in the Negev, via Sinai, and Netanyahu refrained from assassinating the planners beforehand and left it to Southern Command to block the operation, but it failed due to under-deployment and overreaction. Erdogan demanded an apology for the killing of the Turkish citizens in the flotilla; Netanyahu refused. The Palestinians are seeking international recognition; Netanyahu is responding with a diplomatic refusal, by training the army to quell demonstrations and by indirect threats to annex parts of the West Bank in retaliation for the declaration of a Palestinian state.

Complex and conflicted

More than anyone else, the person who pushed Netanyahu into a corner is Palestinian President Mahmoud Abbas. The soft-spoken leader, who was once dubbed "a chick without feathers" in Israel, proved that he is a more effective diplomat than Netanyahu, outflanking him with the initiative of going to the United Nations. The Palestinians paid no price for their refusal to talk to Israel's right-wing government, or for their choice of the "bypass route" of seeking international recognition of their state, instead of conducting negotiations that would necessitate compromises and concessions.

Netanyahu considers Obama to be Abbas' patron and views the U.S. president as being responsible for the Palestinians' moves. In his speech to the General Assembly a year ago, Obama expressed the hope for "an agreement that will lead to a new member of the United Nations - an independent, sovereign state of Palestine, living in peace with Israel" during the year ahead. As Netanyahu sees it, that was the signal to the Palestinians to promote the move on their own.

Seemingly, Netanyahu's position is complex and conflicted. He does not want Palestinians to be Israeli citizens or subjects, hence his declared agreement to a Palestinian state. But he does not believe that an independent Palestine will be secure, and is convinced that if Israel forgoes control of the West Bank's ridges, they will become positions for launching rockets and missiles at metropolitan Tel Aviv and Ben-Gurion airport - and Israel will be destroyed. Even now, Israel is under threat by 70,000 rockets positioned in Lebanon and the Gaza Strip, along with a few hundred long-range missiles in Iran and Syria. Netanyahu believes that Israel can somehow live with that situation, but not with a concentration of short-range rockets on the hills that dominate the slopes of Samaria. Accordingly, Israel must control both the Jordan Rift Valley - in order to block the movement of weapons into the country - and potential launch areas. If not, Israel will not be able to exist, the prime minister warns. In this dilemma, security wins the day and the result is summed up in one word: "No." No freeze, no withdrawal, no talks on the core issues.

The Palestinians have been talking about going to the United Nations for the past year, but Netanyahu made do with diplomatic containment tactics, instead of taking the initiative. He showed no creativity, did not organize any flanking move or give a "Yes, but" response or make an attempt to put forward Israeli counter-claims - such as "recognition of Israel as a Jewish state" - in return for supporting the Palestinian state. And, of course, there was no daring move in the style of Menachem Begin or Ariel Sharon, who gave up less vital territory in Sinai and Gaza, in order to entrench Israel in the West Bank. The peace that Begin signed with Egypt is unraveling, while the "100 Elon Morehs" that Begin and Sharon established in the West Bank continue to flourish and prosper.

Hiding behind Lieberman

The policy of refusing to budge serves Netanyahu's political needs and maintains the stability of his government coalition. Defense Minister Ehud Barak, who warned last winter of a "political tsunami" in the summer, and was in favor of apologizing to the Turks, is talking to the wall. Netanyahu is fond of him and apparently trusts him to manage the defense establishment and ensure political quiet in the army, but consistently ignores his counsel - and now also intends to cut his budget, which the premier dares not do to the settlers (Avigdor Lieberman ) or the ultra-Orthodox (Eli Yishai ).

But we let us not be mistaken. Netanyahu enjoys hiding behind Lieberman, in order to appear moderate, but there is no real dispute between them. It was not for fear of the foreign minister's angry reaction that the premier refused to apologize to the Turks. It was because he considered an apology to be an expression of weakness, which would adversely affect Israel's standing in the Middle East.

Netanyahu was more prescient than others in his assessment that the "Arab Spring" was an ominous development for Israel. Israeli intelligence believed that in Egypt "the ruler had changed but not the government," and others were happy to discover that the demonstrators in Tahrir Square were occupied with domestic issues rather than with burning Israeli flags. The prime minister's assessment was that this was a passing phase and that Egypt without Mubarak would become a new Iran or, at best, another Turkey. He was also right in understanding that Erdogan wanted an Israeli apology in order to show who the regional power is and who the vassal state is - rather than for reasons of etiquette. But Netanyahu's response did not help allay the tension with the Arab states or with Turkey. Rather, it heightened Israel's isolation.

Netanyahu now hopes that Saudi Arabia and the Gulf States, which like Israel are fearful of the changes in the region, will consolidate a secret alliance with Israel against the radical forces in Ankara, Tehran and Cairo, and against the harmful kowtowing policy being pursued by Obama. There is logic to this approach - which led the prime minister to form an alliance with Greece, Bulgaria and Romania to outflank Turkey - but it's unlikely that Saudi Arabia will back Israel in the face of the Palestinian thrust to realize the UN resolution on the ground.

Netanyahu believes that the General Assembly vote will not be translated into a third intifada, and that early deployment will succeed in blocking the protest marches. He is not afraid that the UN will impose sanctions on Israel, and anticipates a drawn-out diplomatic battle with the Palestinians in international institutions and courts.

In the meantime, he will pursue the effort to which he has devoted his whole diplomatic and political career: to instill a new spirit in Western public opinion. Netanyahu continues to hope that one day the Americans and the Europeans will understand that Israel is safeguarding the Middle East for them, and that the Palestinians are a mere nuisance. Unluckily for him, until that dream is realized, he will have to cope with the demands for Palestinian independence in the territories, which enjoys massive international support and is being backed by threats of war, even as Israel is compelled to pack up its burnt flags from the region's capitals.