The Saudi Arabia-backed Islamic Development Bank (IDB) is expected to grant Pakistan a loan of around $4 billion to repair the country’s acute balance of payments problem. This much-needed financial assistance will enhance Riyadh’s influence when Imran Khan takes over as prime minister of nuclear-armed Pakistan. Pakistan has also returned the favour by supporting Saudi Arabia in its diplomatic fight with Canada over the release of women’s rights activist Samar Badawi.

The Saudi loan would be in addition to a $12 billion bailout package being sought from the International Monetary Fund (IMF). Pakistan’s foreign exchange reserves have plummeted so much over the past year that Chinese loans have kept the country afloat.

Pakistani currency has been devalued four times since December last year.

The unintended consequence of the IDB’s loan would be to relieve the pain on Pakistan being currently inflicted by American actions. Washington has not only withheld hundreds of millions of dollars in security aid to Islamabad, but is taking punitive actions to pressurise Pakistan to take decisive action over terror sanctuaries.

This is not the first time that Saudi Arabia has come to Pakistan’s rescue. In 2014, Riyadh had gifted Islamabad $1.5 billion to shore up its foreign currency reserves. The close ties between Saudi Arabia and Pakistan began during the tenure of Zulfiqar Ali Bhutto. According to a CIA report, Bhutto had ‘obtained assurances of generous aid from Saudi Arabia’ during a state visit in 1975. In exchange for such support, Pakistan ‘furnished military technicians and advisers to the armed forces of Saudi Arabia.’ Pakistan helped the Saudis free the Grand Mosque in Mecca in 1979 and stationed its military forces on their territory during the Iran-Iraq War. Most of the troops were recalled after the war ended in 1988, but a smaller contingent stayed on.

Both countries co-operated very closely in supporting the Afghan Mujahideen in their so-called ‘jihad’ against the Soviet occupation of Afghanistan. Pakistan’s Inter-Services Intelligence (ISI), with support from America and Saudi Arabia, helped the Afghan resistance to force the USSR to withdraw in 1989. The Saudi leadership enjoys excellent ties with Pakistan’s military and political leadership. When former prime minister Nawaz Sharif was overthrown in a military coup in 1999 by General Pervez Musharraf, it was Saudi Arabia which provided him with political asylum.

File image of Saudi Arabia’s Crown Prince Mohammed bin Salman. AP

When the Taliban movement had captured Kabul, it was only three countries – Pakistan, Saudi Arabia and the United Arab Emirates – which offered them recognition as the legitimate rulers of Afghanistan. Saudi Arabia largely went along with Islamabad’s policies in managing relations with the new Afghanistan. Riyadh has been anxious to restrict Tehran’s role in Afghanistan, and by extension over Pakistan’s Shia population.

Pakistan’s ill-gotten nuclear weapons also bind Islamabad and Riyadh together. Pakistan is the only country that can potentially provide Saudi Arabia with nuclear weapons, or with a nuclear umbrella. It needs to be recalled that Riyadh had provided liberal aid to Islamabad for the development of an ‘Islamic bomb.’ When Washington imposed severe economic sanctions against Pakistan for carrying out nuclear tests in 1998, it was Riyadh which had come to Islamabad’s rescue. Visits by the Saudi defence minister to the Pakistani nuclear research centre in 1999 and 2002 had underlined the closeness of their relationship. In his book titled ‘Eating the Grass: The Making of the Pakistani Bomb‘, a Pakistani Major General, Feroz Hassan Khan, clearly mentions: “Pakistan and Saudi Arabia have extremely close military ties and several formal defence agreements. Saudi Arabia provided generous financial support to Pakistan that enabled the nuclear programme to continue, especially when the country was under sanctions.” Hassan has also disclosed that when an air alert was declared over all military and strategic installations in Pakistan on 28 May 1998, it was based on an intelligence tip-off from Saudi Arabia.

The thinking in Saudi Arabia is that in the event of an Iranian nuclear attack, Pakistan’s nuclear umbrella will protect the kingdom in one way or another. Moreover, nuclear weapons deployed on Saudi territory and managed by Pakistan can also reinforce Islamabad’s second-strike capabilities and can be used as a hedge to neutralise India’s potential nuclear first strike.

The primary reason behind Saudi Arabia’s recent courting of Imran Khan is bitter rival Iran. Riyadh is not sure what his policy would be towards Iran. In the post-election televised speech, Imran mentioned Pakistan’s ties with both Riyadh and Tehran, while expressing his desire ‘to improve ties with Iran.’ He further noted that, “Saudi Arabia is a friend who has always stood by us in difficult times.” Both Riyadh and Tehran have invited Imran to visit their countries.

Saudi Arabia views Pakistan as an important strategic tool in helping contain Iranian influence. Saudi Arabia’s considerable religious influence in Pakistan is also because of having the most important Islamic holy sites. Over the years, Riyadh has promoted the Wahabi strain of Islamic orthodoxy through liberal financial donations to mosques and madrasas in Pakistan. Many violent sectarian groups of Pakistan have long been recipient of Saudi benevolence. The Saudi royal family still walks a tightrope between the liberalisation necessary for economic development and conservative demands of the Wahabi movement.

Despite very close relations, Pakistan opted out of the Arab coalition fighting in Yemen since 2015 against the Iranian-supported Shiite forces. This refusal was sufficient to spark friction between Islamabad and Riyadh, leading to erosion of trust between Pakistan and the Gulf countries. In fact, there was a sense of shock over Pakistan daring to choose neutrality in a confrontation with Iran. But Pakistan partially reversed that decision, most likely to placate the Saudis. The head of the Saudi-led Islamic Military Counter-terrorism Alliance is the former Pakistan Army chief General Raheel Sharif, underlining the strategic partnership between the two countries. Pakistan’s military establishment has been prompted to counterbalance Indian influence in Saudi Arabia in a more vigorous manner.

Riyadh has been developing a multi-faceted partnership with New Delhi. Counter-terrorism is one of the areas where cooperation between India and Saudi Arabia has been increasing since the India visit of then Saudi King Abdullah in 2006. Indian Prime Minister Narendra Modi’s April 2016 visit to Saudi Arabia further cemented this partnership. During his visit, both the countries condemned terrorism and decided to enhance their counter-terrorism cooperation.

The joint statement between the two leaders “called on all states to reject the use of terrorism against other countries; dismantle terrorism infrastructures where they happen to exist and to cut off any kind of support and financing to the terrorists operating and perpetrating terrorism from their territories against other states; and bring perpetrators of acts of terrorism to justice”. The reference to terrorism was interpreted as directed against Pakistan, whose enduring rivalry and strategic competition with neighbouring India has proved very dangerous for regional security.

India has been suffering from terrorism, financed and supported by Pakistan’s state and non-state actors. Therefore, security cooperation and intelligence sharing are important elements of the partnership that New Delhi and Riyadh are trying to forge. The Saudis have put some Pakistani terror groups on lists of groups deemed a threat to the kingdom. The Saudi government has been frequently helping India apprehend key terror suspects. In 2012, Saudi Arabia arrested and deported Zabiuddin Ansari alias Abu Jundal, who had travelled to Saudi Arabia on a Pakistani passport. The Saudi authorities also deported a suspected founding member of the Indian Mujahideen (IM), Fasih Mehmood, for the 2010 blast in Bangalore. In December 2016, Saudi Arabia deported a ring leader of fake Indian currency note racket, Abdul Salam, who was arrested by the National Investigation Agency (NIA) upon his return to India. In the first week of August, a suspected terrorist belonging to the Lashkar-e-Taiba (LeT) has been arrested by the NIA after Saudi Arabia deported him.

The political leaderships of India and Saudi Arabia have been focusing on the positive aspects of their bilateral relationship. Saudi Arabia has emerged as India’s fourth largest trade partner after China, the US and the UAE. The volume of bilateral trade during 2016-17 stood at around $25 billion. India’s growing proximity with the US, Saudi Arabia’s oldest and principal ally, has also contributed to New Delhi’s growing warmness with Riyadh. Recently, Washington was instrumental in persuading Riyadh to withdraw its crucial support to Islamabad, which eventually led to Pakistan being officially placed on the Financial Action Task Force’s (FATF) grey list in June.

The increased focus on security and counter-terrorism cooperation suggests an increasingly maturing relationship between India and Saudi Arabia that has moved beyond energy partnership. But that is unlikely to impact Riyadh’s unique relationship with Islamabad, which continues to reiterate its commitment to Saudi Arabia’s territorial integrity. Despite recent irritants in the Saudi-Pakistani relationship, New Delhi needs to be realistic about the limits of weaning Riyadh away from Islamabad.