There has always been something stagey and contrived about Israel's blood-curdling declarations that it is going to bomb Iran, but as a strategy it has worked astonishingly well, at home and abroad. Benjamin Netanyahu has been expert at manipulating Israelis' perception of threat. His popularity with voters enabled him last week to dumbfound the country's political observers by forming a coalition with the main opposition party, Kadima, which was desperate to join him to avoid near annihilation in a general election.
Israel's oft-repeated intention to start a war with Iran to prevent it gaining the capacity to build nuclear weapons has always seemed to me to be the bluff of the century. But Mr Netanyahu is a good poker player, and few have had the nerve to bet on him bluffing even when the deadline for his ever-imminent attack keeps on slipping.
Look at his gains so far. Much tougher sanctions have been imposed on Iran than Iranians had imagined could happen because so many countries prefer an economic blockade to seeing Israeli bombers streaking across the Gulf. Iran's leaders, whose belligerent rhetoric is usually matched by cautious policies, probably do not believe what Mr Netanyahu threatens to do to them, but they evidently underestimated the impact of that threat on the rest of the world.
There is another big advantage for Mr Netanyahu to his verbal confrontation with Iran. For the moment, it has sidelined as an international issue the fate of the Palestinians and Israeli settlements on the West Bank. Over the past two or three years, the rest of the world has been too busy pleading with Israel not to start a war with Iran to bother much about what is happening in Ramallah or Gaza.
Knowingly or unknowingly, Mr Netanyahu's many critics and enemies have been a great help to him. Meir Dagan, the former head of Mossad, and Yuval Diskin, until recently head of the Shin Bet internal security service, portray him as an irresponsible warmonger, thereby increasing his leverage in the rest of the world. They may be right. A distinguished historian of Israel told me last week that Mr Netanyahu is "reckless". But this is not quite his record. Extreme he may be in his rejection of any agreement with the Palestinians, but he is skilled in achieving his ends by political means. Unlike his predecessor, Ehud Olmert, and President Shimon Peres, he has never actually started a war, though he has justified those started by others.
His restraint is certainly wise. Israel has not conclusively won a war in almost 40 years. Its prolonged adventure in Lebanon, starting with the invasion of 1982, ended in humiliation and retreat almost 20 years later. In Lebanon in 2006, a month-long bombardment by the Israeli air force and artillery failed to dislodge Hezbollah fighters from their bunkers a few miles from the Israeli frontier. Would Israeli bombers be more successful against Iranian nuclear facilities deep under mountains? And what would be the purpose of such a bombardment? American intelligence says that Iran does not have a nuclear device and has not decided if it wants to make one, but Israeli action would most likely determine it to make a nuclear bomb come what may.
Israel has never gone to war without some sort of green light from America. It is unlikely to do so in future. Nothing matters as much to Israel as its close alliance with the US. Israeli voters know this and tend to react strongly against politicians who endanger it, as Mr Netanyahu discovered to his cost when he lost the general election in 1999.
Here, Iran plays an important role, from Israel's point of view, in cementing the US-Israeli alliance. Israel has always liked to present itself in the US has America's best ally against some evil opponent. Up to 1992, this was the Soviet Union, but, with the collapse of the Soviets, a replacement bogeyman was required. Paradoxically, when Iran was at its most militant, under Ayatollah Khomeini, the Israelis did not go out of their way to demonise his rule or present it as a danger to the world. They were notoriously willing to sell weapons to Tehran during the Iran-Iraq war. It was the end of the Cold War with Moscow that led Israel to present itself as America's bulwark against the Iranian-Islamic threat.
There is a further reason why it is generally in Israel's interest to avoid an armed conflict. Its military and intelligence strength is less than the rest of the world imagines. Real combat tends to reveal this (the same is true of the US military in Iraq and Afghanistan). The 2006 war in Lebanon showed incompetence and incapacity at every level.
Israelis used to be very cynical about the leadership of their armed forces. I particularly like the saying, used at different times about different Israeli generals, that "he was so stupid that even the other generals noticed". An Israeli friend, who used to give talks to Israeli soldiers, once told me that he thought he had met most Israeli military units over the years, and "I've never encountered this heroic army of legend".
Mossad has enjoyed an equally inflated reputation, its history dotted with examples of comic ineptitude. When I was correspondent in Jerusalem in the 1990s, a retired Mossad officer was detained because it had finally been ascertained that Israel's main spy in Syria, whom the officer claimed to control, did not exist. There had once been a highly placed Syrian agent, but he had disappeared years earlier. Since this event would have adversely affected the career of his Mossad controller in Tel Aviv, he simply made up the agent's reports and claimed that the Syrian would meet with nobody else but himself. Acting on the spy's information, the Israeli army was once partially mobilised in expectation of a wholly fictitious Syrian attack.
How far is Washington complicit in Mr Netayahu's strategy of issuing horrendous threats, and how far does it believe them? Certainly, the belief that only an economic blockade of Iran, including a ban on the importation of Iranian oil, can restrain an Israeli onslaught has been useful to the US in isolating Iran. Keeping the Palestinians off the international agenda has also been useful to President Obama, who was not going to do anything about them anyway. Maybe Mr Netanyahu has been astute enough to keep the White House guessing, though the foreign media has guilelessly taken Israel's threats at face value.
The real threat to Israel is not Iran or any single state. It is rather the uncertainty engulfing the whole Middle East in the aftermath of the Arab Spring. Israel's cosy relationship with dictators and monarchs has been disrupted and thrown into the air. Their successors are likely to be less accommodating. Meanwhile, the Iranian leadership, careful and devious as ever, appears to be moving towards a compromise on nuclear development that will enable it to retreat without losing face.