Sometimes a leader's weaknesses can be their great advantage.
Donald Trump is impulsive, unpredictable, shallow and devoid of rational thought.
The senior leadership in the Iranian government, which will discuss in the coming days how to respond to the assassination of Qassem Soleimani, will find it difficult to prepare for the challenge that this presents.
As strange as it sounds to an Israeli ear, the ayatollahs in Tehran are currently more grounded and more calculating than the president of the United States.
They have to come up with revenge for Soleimani that is horrifying enough to deter Trump from further action, but not so horrifying as to drag him into war.
It is a conundrum with no easy answer.
"You can't do anything," Iranian Supreme Leader Ali Khamenei taunted Trump on Twitter on Wednesday.
Less than 48 hours later, an American missile ended the life of one of his most carefully groomed disciples.
It is doubtful that Khamenei’s provocation swayed Trump’s decision to approve the operation (this approval apparently predated the tweet) but there is a valuable lesson here for everyone, including Israel's own politicians: It is better to think twice before tweeting.
Soleimani was marked for death. His role in planning and perpetrating previous acts of terrorism against Israelis and Americans, and his potential for damage in the future made him a high value target.
Israel could have killed him in February 2008 in Damascus, but the only target that night was Hezbollah's chief of operations Imad Mughniyeh.
According to foreign reports, Israel received assistance from the CIA in gathering information on the target.
This assistance was conditional on a commitment at the highest level: Prime Minister Ehud Olmert was required to pledge to President George W. Bush that Mughniyeh would be the only one eliminated that night.
And thus it was presented with a dilemma as Soleimani and Mughniyeh were seen together on their way to a meeting. Olmert gave the order to wait and Mughniyeh was eliminated after saying goodbye to Soleimani.
In recent years, Soleimani's status changed: he took a more forward-facing role in the world where military and politics meet and started to frequently appear in public.
His new status granted him a layer of immunity, at least from Israel, which is wary of assassinating other countries' generals, diplomats and political leaders.
To Israel, there is a fundamental difference between a terrorist organization and a state, even if it is a terrorist state like Iran.
America, on the other hand, allows itself to behave differently. While in 1976, following a series of embarrassing incidents, President Gerald Ford actually banned the assassination of foreign leaders, the Americans still tried to eliminate Libyan ruler Muammar Gaddafi in 1986, Serbian leader Slobodan Milosevich in 1999 and Saddam Hussein in 2003 (all three attempts failed).
Foreign policy is not usually at the center of American election campaigns. Most Americans had not heard the name Qassem Soleimani until Friday and are likely to forget it again next week.
The Iranian issue will only preoccupy them if the retaliation is particularly painful.
Which brings us back to Trump. In one of his tweets after the assassination, the president mentioned the 2012 attack on the U.S. Consulate in Benghazi that claimed the lives of the American ambassador to Libya and five other Americans.
"This will never, ever be a Benghazi," Trump said of the attack on the U.S. Embassy in Baghdad embassy by pro-Iranian militias.
If there is anything consistent about Trump, it is his loathing of all things Barack Obama and Hillary Clinton.
During the 2016 election campaign, Trump even accused Clinton of abandoning the Americans at the Libyan consulate.
The murder of the U.S. contractor by a pro-Iranian militia in Iraq and the attempted breach of the Baghdad embassy took Trump back to the Benghazi experience.
There is no way that the desire to sock it to Clinton played no role in his decision to approve the Soleimani operation.
President Obama and Vice President Joe Biden supported the establishment of the Soleimani-controlled militias.
They believed that their establishment was essential to the war against Islamic State. They did not understand, or did not want to understand, that when the war was over, Iran would turn its militias on America's allies and American troops stationed in Iraq.
The assassination was a shot across the bow in the confrontation between the two nations, which could well culminate in U.S. forces leaving Iraq. Ironically, this was the endgame for both Trump and Soleimani.
Israel, of course, has other plans. In the midst of the Iran-Iraq war, Prime Minister Yitzhak Shamir was quoted as saying, "I wish both sides success."
This time Israel is rooting for just one side, but as then, only wants to stay in the stands and not be dragged onto the field.