By all accounts, Prime Minister Narendra Modi’s visit to Israel earlier this month was very successful. It was the first time an Indian head of government had visited the Jewish state. It was the culmination of normalization, which began with the establishment of full diplomatic relations in 1992. With the end of the Cold War and the emergence of the United States as the sole superpower, New Delhi realized that it could benefit from Israel’s close relationship with Washington. This was considered essential to assuaging lingering American concerns over India’s intimate relationship with the Soviet Union during the days of bipolarity.

Moreover, with the Russian economy and its defense industry in shambles, India needed access to other sources of sophisticated weaponry to replace aging Soviet equipment, which Russia was initially unable to supply. With access to U.S. and European weapons markets denied because of India’s refusal to sign the Non-Proliferation Treaty (NPT), New Delhi found in Israel a useful surrogate, one that could supply it with advanced military technology. Thus was established the basis of a burgeoning arms trade, which reached almost $600 million in 2016, making Israel the second-largest source of defense equipment for India, after Russia. Indian weapons acquisitions from Israel include AWACS, UAVs, radars, missiles and laser-guided bombs. Israel Aerospace Industries has recently signed an agreement to supply $630 million worth of long-range surface-to-air missile systems to the Indian navy. More deals are in the works.

Security cooperation between the two countries increased with the emergence of the Pakistan-based terrorist threat to India, first in Indian-administered Kashmir and then in the rest of the country. The dramatic terror attacks in Mumbai in 2008 starkly exposed Indian vulnerabilities to terrorism and accelerated counterterrorism cooperation with Israel, which has faced similar attacks for decades. Although the sources and rationales for terrorist attacks against the two countries differ widely, similarities in the conduct of such operations coupled with the so-called Islamist inspiration for such attacks have led to the perception that both India and Israel face very similar, if not identical, threats.

Similar Israeli and Indian stances on the NPT have further spurred cooperation. Both are nuclear powers who have defied the international system by not signing the NPT. The difference is that India suffered for its defiance; it faced international sanctions on the import of dual-use technology until the U.S.-India nuclear deal, signed in 2005 and ratified by the U.S. Congress in October 2008, lifted the ban on nuclear trade with India. Israel, because of its special relationship with the United States, largely escaped unscathed, except for occasional verbal condemnation by its adversaries. New Delhi has, reportedly, been importing dual-use technology clandestinely from Israel since the 1990s to sustain its missile program, despite sanctions.

For many years, India favored a subtle relationship with Israel. Historically committed to the Palestinian cause, India couldn’t risk damaging its ties to the Arab world. With Arab front-line states, like Egypt and Jordan, embarking on full diplomatic relations with Israel, it made no sense for India to feel ambivalent about its relationship with Tel Aviv. It also soon became clear that Saudi Arabia, India’s top oil supplier, had entered into a de facto alliance with Israel aimed at curbing Iranian influence.

To top it all off, the crumbling of state structures in the Arab world following the American invasion of Iraq in 2003, and culminating in the collapse of the Syrian state in 2011 in the wake of the short-lived Arab Spring, made it apparent to New Delhi that major Arab states were in no position to pursue active foreign policies and had become largely redundant as far as Indian foreign policy was concerned. This loosened the remaining shackles on the development of India’s relations with Israel.

Domestic political changes within India, especially with the Hindu-nationalist BJP replacing the secular Congress Party as the dominant political party in the country, have led to a major attitudinal transformation among the Indian political elite toward Israel. The Congress’s support for the Arab-Palestine cause was in part driven by its ideological commitment to the sustenance of an inclusive polity within India, which has a very sizable Muslim minority of over 170 million. The BJP, on the other hand, is committed to an exclusivist definition of Indian nationhood based on the ideology of Hindutva (Hinduness) and Hindu Rashtra (Hindu state), which has rendered Muslims marginal to the operation of the Indian polity.

The BJP’s anti-Muslim outlook jells well with the stridently anti-Arab attitude of Israel’s Likud; it is akin to the Israeli Right’s definition of nationhood based not on citizenship but on race. Modi and Benjamin Netanyahu are, therefore, very comfortable with each other as ideological comrades pitted against a common enemy. This ideological affinity between the ruling elites of the two countries has helped further cement a relationship that is largely based on realpolitik considerations. The benefits that accrue to them from close cooperation suggest that this relationship can be expected to outlast changes in government in one or both capitals.

Mohammed Ayoob is a senior fellow at the Center for Global Policy and the University Distinguished Professor Emeritus of International Relations at Michigan State University.

Image: Israel's Prime Minister Benjamin Netanyahu (R) walks with India's Prime Minister Narendra Modi, as they visit Olga Beach and a water desalination unit operated by G.A.L. Water Technologies, near Hadera, Israel July 6, 2017. Kobi Gideon/Courtesy of Government Press Office/GPO/Handout