Karl Marx wrote that history repeats itself, first as tragedy and then as a farce - and veterans of Israel's military industries can certainly relate.
Israel has many times watched attempts to improve relations through arms sales become a security threat.
Take, for example, the Israeli-made Soltam mortars, which were sold to Iran's Shah Mohammad Reza Pahlavi and a decade later landed on the heads of IDF troops in Lebanon.
Or the various missiles, drones and advanced intel systems sold to the Turkish army during the honeymoon period of the 90s, which today are owned by one of Israel's most hostile enemies and which the Iranians have no doubt already been given a peek at.
Thank goodness the plans to sell Turkey versions of the Merkava tank and the Ofek-class spy satellite did not go through before Recep Tayyip Erdogan came to power.
Worthy of mention is the Israeli-made CCTV system sold to Dubai, which helped identify those whom the local police chief claimed were Mossad agents behind the killing of Hamas military leader Mahmoud al-Mabhouh in a hotel room in 2010.
The ongoing opposition of Israeli defense officials to a plan by Mossad chief Yossi Cohen to sell advanced weaponry to the UAE is based on a clear view of the ever-shifting dynamics in the Middle East.
The Defense Ministry is the first to have a vested interest in exporting Israeli weapons systems, something that strengthens the defense industries and helps them develop future generations of IDF weaponry.
The ministry even receives royalties from each foreign export of systems developed with state funding by external contractors such as Israel Aerospace Industries, Elbit and Rafael.
The products developed by the Israeli defense industry are some of the best in the world, and it is only natural for the UAE to want them for its own army.
But the recent sale of Iron Dome and Windbreaker missile defense systems to the U.S., Spike missiles to Germany, spy satellites and reconnaissance aircraft to Italy, UAVs to Switzerland and radar to the Czech Republic are not on the same level as selling such systems to a Muslim Gulf state - even if it shares a common enemy like Iran.
The Defense Ministry has already approved previous sales of Israeli military technology to the UAE, albeit not very advanced systems and under clear restrictions.
The Middle East is not Europe, experience has shown that today's friendly ally can easily become tomorrow's archenemy.
So even with the desire to build closer ties to the Gulf states and use oil money to boost the Israeli economy, the country must carefully consider any security deal and know when to say no.