Israel officially maintains neutrality over Nagorno-Karabakh, an Armenian-majority region that is internationally recognised as part of Azerbaijan but has enjoyed de facto independence from Baku for decades.
The region remains at the heart of a raging conflict between Armenia and Azerbaijan, who have been engaged in a fresh round of hostilities since last Sunday, accusing each other of carrying out provocations along the line of contact in Nagorno-Karabakh.
Even though Israel is not taking sides in the conflict, Arye Gut, an Israeli expert on Israel-Azerbaijan relations, who played a pivotal role in shaping the relations between the two countries, says it is clear that when the choice lies between Baku and Yerevan, the Jewish state will always prefer the former.
For Armenia, which has just recalled its ambassador in protest over Israel's alleged supply of "ultra-modern weapons" to Azerbaijan, it also seems clear where the Jewish state's loyalty lies.
"Traditionally speaking, Azeris and the Jewish people have always had good relations. I am a native of Baku and I can tell you that our community has never been persecuted. Never did we experience any anti-Semitism", Gut reassures.
Beginning of Friendship
Since the collapse of the Soviet Union in 1991 that unofficial bond has only become stronger and has gradually developed into full-fledged diplomatic relations.
In 1992, when Azerbaijan announced its independence, Israel was one of the very first countries to recognise it. Soon afterward, the two states opened embassies and exchanged ambassadors, paving the way for cooperation on a number of important projects.
For Azerbaijan, interest in Israel was clear. Apart from boasting a wide array of technologies and innovations in the sphere of agriculture, the Jewish state is also known for its weapons, and Baku which has been challenged by neighbouring Armenia in the disputed Nagorno-Karabakh region wanted to make sure that it would have a military advantage in the event of an armed conflict.
It was for this reason that in 2012 Azerbaijan inked a $1.6 billion deal with Israel, reportedly the largest single arms purchase ever, supplying itself with an array of drones, anti-aircraft and missile defence systems.
Although these agreements stirred criticism in Israel, primarily from liberal circles who objected to the idea of supplying "dictatorships" with arms, Israel turned a blind eye to Azerbaijan's internal affairs, and Gut says it was because of the Jewish state's own interests, primarily its need for oil.
Lacking its own resources, the Jewish state has been dependent on Azerbaijan for years, with Baku supplying 40 percent of the country's needs for crude.
Oil, however, is not the only reason for the close ties. The other interest has always been cooperation against Iran.
According to Gut, some 35 percent of Iranians are of Azeri origin and many are suffering at the hands of "the Ayatollah regime", something that pushes Baku to cooperate with Israel against the Islamic Republic.
The Jewish state's interest in this sort of cooperation is also clear. Feeling threatened by promises to "wipe the Zionist enemy off the map", Israel sees Azerbaijan's proximity to the Islamic Republic as an advantage.
"Azerbaijan is located in a strategic location. It is close to Iran and as such it makes reconnaissance missions feasible. Iranians know that and obviously are not happy with this fact but there is nothing that they can do", opines Gut, adding that he could not elaborate on the nature of the "tight" security cooperation between Baku and the Jewish state, given how clandestine it is.
But no matter how good these relations are, Gut says they will only get tighter with time.
"The current leadership of Azerbaijan appreciates Israel not only because cooperation with it serves their national interests but also because they know that the Jewish state can be relied on. I only see this bond getting stronger".