BAKU – In a crowded classroom inside a distinctly non-impressive building at the Baku Slavic University – a city dotted with grand, European-style mansions just down the street from postmodern, futuristic buildings – a modest ceremony took place January 27, International Holocaust Remembrance Day.Hundreds of similar programs and ceremonies took part around the globe on the same day, and this one was far from the largest or the most impressive.Moreover, with attempts by some of the organizers of the event to draw parallels between the genocide of the Jews and the murder of Azerbaijanis by Armenians in the last century, it surely did not run according to what Yad Vashem might consider an ideal script. (One sign at the entrance to the hall had a poster that read “Holocaust and Khojaly,” a reference to the 1992 massacre of hundreds of Azerbaijanis during the war with Armenia over Nagorno-Karabakh.) But still.Here, in the middle of Azerbaijan, an Islamic country with a majority Shi’ite population, a ceremony took place commemorating the murder of six million Jews.To put that in proper perspective, consider that in Iran – Azerbaijan’s menacing neighbor to the south – the government denies the Holocaust and sponsors cartoon contests mocking it.And consider as well that Turkey, its neighbor to the west and its closest ally, has a president – Recep Tayyip Erdogan – who has accused Israel of committing genocide against the Palestinians, and likened Israel’s actions to those of the Nazis.Yet despite its neighbors and their leaders, members of this country’s small but ancient Jewish community – including a Jewish member of the Azerbaijani parliament – were discussing the Holocaust in a room filled with Muslim students from the university and members of the media. And all that under government sponsorship. Welcome to Azerbaijan.“One of our greatest achievements,” explained Kamal Abdulla, Azerbaijan President Ilham Aliyev’s adviser on multinational, multicultural and religious affairs, “is our independence. We are not dependent on anyone.”Certainly not on Russia, nor the US. And neither on Iran, nor Turkey. Which explains why a Holocaust memorial ceremony could take place in Azerbaijan at all.LIKE ALL lands, Azerbaijan has its paradoxes.Over-sized photos of Aliyev, and even more so, ever-present pictures and huge monuments to his father, Heydar Aliyev, festoon the streets of a country that prides itself in having come out of the shadows of Soviet rule. Government officials and spokesmen constantly praise the country’s multiculturalism, even though 92 percent of their 9.4 million people are Muslim. And the leader has pumped $180 billion generated from phenomenal oil income into revitalizing and modernizing the capital, even as parts of the colorful city have no sidewalks.But there is no greater Azerbaijani paradox than its close relationship with the Jewish state – a relationship that is only getting closer with time.“The level of trade in 2012-2013 with a country like Azerbaijan is very impressive,” Foreign Minister Avigdor Liberman said in January, at a meeting in Jerusalem with Israel’s ambassadors in Euro- Asia. The $5b. in annual trade with Azerbaijan, he said, is more trade than Israel does with France.But few in Israel are aware or know about that – not the trade, nor Azerbaijan, nor Israel’s relationship with it. The vast majority of that trade is the oil Israel buys via the Baku-Tbilisi-Ceyhan pipeline – Jerusalem buys some 40% of its oil from Baku – and most of what Azerbaijan buys from Israel is in the sphere of weapons technology or arms. And both those categories of purchases are strategic ones, generally kept well out of the news. As Aliyev said a few years ago in a quote captured in a WikiLeaks cable from the US embassy in Baku: The Israeli-Azerbaijani bilateral relationship is like an iceberg, nine-tenths of it below the surface.SAY THE name Azerbaijan to friends, and some will likely mangle it, calling it instead Azerbastan. Their minds will probably conjure up images of fighting and Muslims and extremists.Those with strong geographic awareness might think of the Caspian Sea; those who have literary tendencies might remember Kurban Said’s classic novel Ali and Nino.The rest, however, might just confuse the country with the nearby “stans,” mixing it up with Kazakhstan, Turkmenistan, Tajikistan and Kyrgyzstan.“We came here with a bit of skepticism because this is a Muslim state, and we are surrounded by Muslim states that don’t like us,” said Acre Mayor Shimon Lankri during a meeting with government officials at the end of January in Baku, summing up mainstream Israel’s gut impression of Azerbaijan.“Most people in Israel don’t know much about Azerbaijan.We were surprised by the depth of the relationship between our two countries, and also by the development that we see in this city.”Lankri was the head of a small Israeli delegation brought over by the Azerbaijani government, with one of the purposes being to better expose Israelis to the country and its ties with Israel.Lankri, who has some 9,000 Jews of Azerbaijani origin in his city of 60,000 people, is building a community center there for Jews from the Caucasus, which will also serve as a heritage house for the 70,000 Azerbaijani-born Jews now living in Israel.And it is those Jews, or rather the Jewish community that spawned them, which have been one of the key catalysts that have motored the burgeoning ties between the two states.SOME TWO hours north of Baku, through barren steppes with the Caucasus Mountains visible along the horizon, sits the city of Quba, capital of a region of some 150,000 people.Across the river from Quba is Krasnaya Sloboda, or Red Town, an entirely Jewish village of some 4,000 Jews – think of a Central Asian version of New York’s Kiryas Joel, without the hassidim.David Pessachov, the representative of the Jewish village on the regional council, praises through a translator his country’s treatment of the Jews, both today and historically.While anti-Semitism in Europe is on the march, he noted, in Azerbaijan it doesn’t exist, and never has. Even in the days of the Soviets, the Jews in Quba did not suffer the same degree of repression as their coreligionists elsewhere in the Soviet Union, he asserted.To underline his point, Pessachov quoted a comment Aliyev said about the Mountain Jews, who make up most of the Jews in the village: “Jews are my friends, Mountain Jews are my brothers.”Asked if he feels safe in Azerbaijan, he said “completely,” and returned the question: “Do you feel safe in Israel?” But safety, it seems, is not everything: His father lives in Israel, his mother in New York, and three of his children in Moscow.To judge by the facilities for Jews in Quba, and in Baku, those Jews who do leave the country are not doing so because they can’t live a Jewish life in Azerbaijan. On the contrary, the government – and various Jewish organizations – have gone to great lengths to rebuild synagogues, build mikvaot, ensure ritual slaughter and make sure that Jews have the ability to live as Jews in the country, if indeed that’s what they want to do.One such synagogue is in Quba, where – next to a park with a huge statue of Heydar Aliyev, Azerbaijan’s equivalent of David Ben-Gurion – stands one of the neighborhood’s three synagogues (there were 13 in this region of the Mountain Jews before the Soviets moved in). The park is surrounded by mansions, some sitting empty and owned by oligarchs who live abroad, but want to retain a link to the Jewish village of their birth.The Quba region is known for its detailed, tightly woven Persian rugs, and a number grace the floor of the central synagogue, also artfully decorated with wood-carved furnishings.A man stands at the door to the synagogue entrance, instructing those who enter to take off their shoes; not, as one might suspect, to protect the rugs, but rather in the tradition of the Mountain Jews, because God instructed Moses to doff his sandals before approaching the burning bush. That’s one interpretation of the custom. Another: It’s an adaption of the Muslim custom of taking off shoes for prayer.In a side room, an emissary from Israel is teaching some 40 young women – aged 14 to 25 – about Jewish history, “from creation to the present.” The girls smile and shake their heads affirmatively when asked, through a translator, if there is a future for Jews in this place. They were born there, their parents and parents’ parents were born there, and they have what they need to live Jewish lives.“Why not?” one woman responds, “all we need are jobs.”KAMAL MAKILI-ALIYEV, a research fellow at the Center for Strategic Studies, a Baku think tank, attributes the seemingly anomalous ties between this secular Shi’ite country with the Jewish state in some part to those girls and their families – the historic Jewish community of Azerbaijan, a community dating back some 2,500 years that today numbers some 9,000 people, from a peak of nearly 60,000 in 1926.“We used to, and still, have close ties with the Jews. Azerbaijan hosted a very large community in Baku, and in the northern part of the country. We have always had common links, and the community had its influence,” he said, adding that the Jewish community has had a significant impact on the society in music, architecture and as fighters during the world wars, and – more recently – in the Nagorno- Karabakh conflict.Azerbaijani Foreign Ministry spokesman Hikmet Hajiyev echoed this sentiment, saying the “human dimension” should not be underestimated and has played an “important role” in the development of ties between the two countries.But that, obviously, does not tell the whole story.Iran also has an ancient Jewish community – as did Yemen, Iraq and Syria – but none of that did much to help ties with Israel. Sentiment may help grease the relationship between the two countries, but they are not the building blocks of the relationship; those building blocks are interests.IT IS not difficult at all to figure out why Israel is keen on ties with Azerbaijan. First, all one has to do is look at a map. Sandwiched between Russia, Turkey, Georgia, Armenia and Iran, and on the oil-rich Caspian Sea, the country is very strategically located.“The relations with Azerbaijan are very special,” said Israel’s ambassador to the country, Rafael Harpaz, sitting in the Israeli Embassy in Baku, the target of a planned terrorists attack six years ago that was foiled thanks to close Israeli-Azerbaijani intelligence and security cooperation.“This is a secular, Shi’ite Muslim country,” he said, indicating it could be a model for Israel’s relationship with other non-Arab Muslim countries.Indeed, ever since Israel’s creation in 1948, Jerusalem has sought and worked hard to develop close ties with non-Arab Muslim states, partly as a way of diminishing the religious element of the Arab-Israeli conflict.Thus, Israel forged close ties – as part of its well-known Periphery Doctrine in the 1950s – with Iran, until the fall of the shah in 1979; and with Turkey, until the rise of Erdogan in 2002.The ties with Azerbaijan – a member of the Organization of the Islamic Conference – fit well into that pattern, at least the first part of the equation: the flourishing of ties. And the Azerbaijani government is taking steps to ensure that the second part of the equation does not materialize, and that the country does not lose its overwhelmingly secular nature and became increasingly Islamic – something that happened in Iran and in Turkey, effectively destroying relations with Israel.For instance, to prevent the spread of a radical brand of Islam from penetrating society – either an extreme brand of Shi’a from Iran, or an extreme Sunni Wahhabi brand from Saudi Arabia – the government has mandated that only locally educated clerics can serve as imams in mosques.And to prevent its citizens from going abroad to fight for groups like Islamic State, and then returning to take on the local authorities, it has enacted a law making it illegal for Azerbaijani citizens to fight in a foreign army. Anyone who does – and returns to the country – can be jailed.A desire by Israel to forge close ties with a secular Muslim state to serve as a model for others to follow is, indeed, one of Israel’s interests in the country; it is also the interest that diplomats speak of openly. But it is, obviously, not the only one.The WikiLeaks cable from January 2009 provided a less varnished picture of Israel’s interests.“Israel’s relations with Azerbaijan are based strongly on pragmatism and a keen appreciation of priorities,” read the cable written by Rob Garverick, America’s political/ economic counselor in its Baku embassy at the time. “Israel’s main goal is to preserve Azerbaijan as an ally against Iran, a platform for reconnaissance of that country, and as a market for military hardware.” Both countries, he averred, view Iran as an “existential threat.”What was true then, in 2009, remains even more true today.ISRAEL QUICKLY established diplomatic ties with Azerbaijan after the fall of the Iron Curtain, moving quickly to set up an embassy there in 1992. This took place during the heyday of Israeli-Turkish ties and, as Gallia Lindenstrauss, a research fellow at the Tel Avivbased Institute for National Security Studies, wrote in a paper on Israel-Azerbaijan ties, there were visions at the time in Jerusalem and Washington of an Israel- Turkey-Azerbaijan-Georgia arc to counterbalance a Syria-Iran-Armenia-Russia axis.This was in the midst of the war with Armenia over the Nagorno-Karabakh region, a war which is a defining point for the Azerbaijanis. Since that war, Armenia has occupied some 20% of Azerbaijani territory, creating what the Azerbaijani officials say are a million refugees.Most of the world can’t pronounce the name of that region and is unfamiliar with the conflict, but for Azerbaijan it is a dominant political fixture of life. It colors everything; nearly all meetings with officials or academics return, at some point, to that war, the Armenian seizure of Azerbaijani territory and what is viewed in Baku as the world’s double standard.“Why does the world shout at Russia to leave Ukraine?” asked Ziyafet Asgarov, first deputy speaker of parliament. “That is a double standard. Why are there sanctions against Russia, but nothing about Nagorno-Karabakh? Why do the Americans criticize Azerbaijan, but are quiet about Armenia? Why are there no sanctions against Armenia to leave our occupied territory?” Nagorno-Karabakh – which these days is once again simmering with deadly border incidents and on the cusp of exploding into another full-fledged war – is also the unstated reason that Azerbaijan, slowly raising the profile of its ties with Israel, has not yet established an embassy in Tel Aviv. The Azerbaijanis are worried that if they do so, the Arab and other Islamic countries, many of which support their position on the region, will vote against them on this issue in international forums.Jerusalem is well aware of this sensitivity, and for that reason doesn’t force the issue. If you are getting 40% of your oil from the state, selling it billions of dollars of arms – including drones that are used to monitor the long border with Iran – you can live without an Azerbaijani ambassador in Tel Aviv.ISRAEL’S TIES with Azerbaijan represent one of these bilateral relationships where it is quite easy to determine Israel’s interests, but – considering the costs – somewhat more difficult to identify the interests of the other side.Iran, for instance, is unhappy at the closeness of ties – ties so close that Shimon Peres visited there as president in 2009, Foreign Minister Liberman three times since 2009, and Defense Minister Moshe Ya’alon in 2014. Azerbaijan’s foreign minister visited Israel in 2013, and Aliyev meets with Israel’s leaders consistently at various international gatherings.A story is told in Baku of Heydar Aliyev, president from 1993 to 2003, who during one state visit to Iran was being chastised for his country’s relationship with Israel.“Why do you support Israel, which occupies Palestine?” he was asked. To which he is said to have responded: “You are blaming me for ties with Israel, where the Palestinians are still living in the West Bank.But you have strategic ties with Armenia, which not only occupies our territory, but has also ethnically cleansed the area of Azerbaijanis.”That Azerbaijan is willing to defy the wishes of Tehran – as well as Ankara – and carry on a close relationship with Israel says something about the significance it attributes to the relationship. That significance came out in a meeting with Ali Hasanov, a senior adviser to Aliyev and one of the country’s most politically influential figures. During the 45-minute meeting he interrupted the discussion only once, and that was to take a phone call from the president.He refers to Israel as a “very important” ally and strategic partner, and stressed that the ties between the countries will continue to develop and flourish “despite the pressures.”“We have relations with all countries of the world according to our interests,” he said, including countries that are enemies and rivals of one another, such as the US and Russia; and of course, Israel and Iran, and Israel and Turkey.The main reason Baku is so interested in those ties: access to technology, and especially arms.Makili-Aliyev, from the Baku think tank, is upfront about it. “We are very interested in importing arms,” he said. “Because of Nagorno-Karabakh, we cannot buy in the West due to the ban on [selling arms] to countries in military conflict.”Or, as the WikiLeaks cable spelled out, “Through its close relations with Israel, Azerbaijan gets a level of access to the quality weapons systems it needs to develop its army that it cannot obtain from the US and Europe due to various legal limitations, nor from its ex-Soviet suppliers, Belarus and Ukraine.”Another reason, Makili-Aliyev said, is because the country needs customers for its energy resources and is keen on diversifying its markets. “We have to sell and are interested in diversifying. Israel is a good partner for energy to go south.”And another major reason for the relationship is Azerbaijan’s belief, openly stated, that good ties with Israel mean good ties with American Jewish organizations, the mythical “Jewish lobby.”“Israel is important to us because it opens up a bridge to the Jewish lobby in the world,” Hasanov said candidly.In this construct, the Jewish lobby is not some malevolent force pulling all the world’s puppet strings, but rather well-placed supporters of Israel who are much better connected in Washington than Azerbaijanis, and who could from time to time put in a good word for the country – especially at a time when it is coming under increased criticism in the US for alleged human rights violations.The Armenians have a strong lobby in the US; the Azerbaijanis don’t. Strong ties with Israel build strong ties with American Jewish organizations, seen by many Azerbaijani officials as having crucial influence in Washington.Liberman, following his 2012 trip to Baku, said that “Azerbaijan is more important for Israel than France.”What he also could have said is that this relationship is not a one-way street, and that for Azerbaijan, Israel is also more important than France – something which explains why a relationship that on paper doesn’t seem to add up, continues to flourish and pay rich dividends to both sides.