ISLAMABAD: When Pakistan’s parliament adopted a resolution to stay out of a Saudi-led war against Yemen last April, consternation across the Gulf was palpable. Until 2015, the most compelling reason for Pakistan to retool its Middle East policy was to prevent sectarian violence in the region to galvanize Pakistan’s own Shia-Sunni fault-lines.

For decades, Pakistan’s approach to the Middle East has been shaped by two competing heritages: religious and post-colonial. But the rise of new power poles in the Middle East, together with the international response to Paris after last week’s deadly attack, will likely heighten the need for a hard Middle East policy review in Islamabad in the coming days.

This year, Pakistan’s ties to the Middle East have weathered increasing geopolitical uncertainty. While Iran came out of the cold, Yemen went under. With the Islamic State (IS) drawing strength and potency from fatal western policy miscalculations in Iraq, it has become clear that the absence of any real P5 consensus on solving the crisis in the Middle East will only hasten the region’s unraveling and the diffusion of terrorist cells as far east as South Asia. More than French-led airstrikes against Syria, the geopolitical game-changer in the Middle East is Moscow’s first overseas deployment since Ukraine, spurring new anxieties in Central and South Asia, and tempering the international rallying cry for regime change in Damascus. New drivers of tension in the Israel-Palestine conflict, meanwhile, require proactive policy decisions in Islamabad to mitigate any political fallout on the Pakistani street.

After Beirut and Paris, Islamabad will also have to define its security interests and cultivate partners in the Middle East beyond a Riyadh-Tehran binary. Pakistan shares a 560 mile desert border with Iran but also shares maritime waters with Gulf countries. Pakistan’s status as the second-largest member of the Organisation of Islamic Cooperation (OIC), together with its lead role in Combined Task Force 151, a multinational naval task force set up to respond to pirate attacks in the Gulf of Aden, puts it in a position to steer multilateral security conversations in the region. In addition, Pakistan’s ambitious plans to develop the Gwadar port into South Asia’s newest gateway to the Arab Peninsula make it a consequential if subsidiary player in an increasingly unstable Gulf Cooperation Council region. To the west, Qatar’s role in facilitating an intra-Afghan reconciliation process and hosting a de-facto Taliban office makes it an increasingly important stakeholder for Pakistan to engage with smartly. On the commercial side, Islamabad hopes a deal to import Qatari liquefied natural gas for the next 15 years will supplement a separate, Russian-sponsored, $2 billion Karachi-Lahore gas pipeline that will feed Pakistan’s energy-starved industries.

In the wake of IS’s deadly attacks on Paris and Beirut, it is all the more imperative that Pakistan temper its position in a U.S.-Russia standoff in the Levant with an eye on preserving South Asia’s own precarious stability. Moscow’s play for primacy in the Middle East via military action in Syria may foreshadow interventionist ambitions in Afghanistan and Pakistan as Vladimir Putin looks to remodel his neighborhood. A contract for the sale of four Mi-35 transport and attack helicopters from Russia to Pakistan was finalized in August and President Ashraf Ghani in Kabul is increasingly looking to the Kremlin for military hardware. Now as Russian support for the Assad regime drives up the international community’s stakes in the Middle East — a region where both neutrality and non-intervention carry a price-tag — Pakistan must tread cautiously.

Under Saudi pressure in 2014, Pakistan came precipitously close to abdicating its non-partisan policy in Syria. With China now adding its name to a list of global powers calling for a political solution in Syria, pressure is likely to mount on Pakistan to clarify its position at the United Nations. And while Pakistan may be on the periphery of Syria’s killing fields, the diffusion of IS and its splinter cells to ‘Khorasan’ training camps in Afghanistan has given rise to considerable strategic anxiety in Islamabad. Of particular concern to Pakistan will be the long-term viability of any prospective anti-IS coalition, in the absence of real and meaningful plans to stabilize an Afghan regime that is already under attack. The eastern hillsides of Achin, Kot, Haska Mina, and Pachir Agam in Nangarhar province — a stone’s throw away from an embattled Pakistani border — have become strategic IS footholds, where locals are now forced to carry ‘Khorasan’ residency cards. The Islamic State is presently recruiting in as many as 25 out of 34 Afghan provinces, as suggested by a recent U.N. report.

As warfare and migrations fracture twentieth century nation-state boundaries across the Middle East and North Africa, Islamabad may have to rethink its partnerships within the region, beginning with its longtime partner, Saudi Arabia. Pakistani pilots flew Royal Saudi Air Force planes against South Yemen in 1969 and Pakistani troops were deployed in the kingdom at the height of the first Iraq War. In return, the Saudis have bailed Pakistan out financially and diplomatically in times of trouble. But there is growing parliamentary pushback in Islamabad to Saudi Arabia’s perceived stewardship of Pakistan’s Middle East policy. Last year Pakistan rejected a request by its “most allied” ally in the Middle East to deploy troops against Bahrain and displayed the same reluctance to join Saudi Arabia’s fight in Yemen this spring.

The number of madrassas in Pakistan fed by Saudi funding and operated with minimal federal oversight is also giving rise to increasing skepticism in Islamabad. This summer, Saudi Arabia suffered major attacks, claimed by IS, on Shiite mosques and gatherings. In the coming decade, increasing instability in the oil kingdom is likely to up the geopolitical ante. Unstable oil prices, a resistance to internal reform, wars in Syria and Yemen, and simmering discontent in Bahrain (which recruits Pakistanis for its law enforcement and paramilitary forces) all mean that Riyadh may seek to strengthen its relationship with Pakistan at the same time that Pakistan tries to diversify its regional alliances.

If Saudi Arabia comes knocking, Islamabad’s lawmakers insist that Pakistan’s answer be rooted in a broader strategic objective: cracking down on terrorist financing from the Gulf, reining in rogue madrassas as part of its now year-old National Action Plan, worrying less about Saudi rebuke, and building partnerships across the Gulf with public transparency as their baseline.

One such partner may be found in Iran. Geographic contiguity and greater cooperation between Islamabad and Tehran could lead to progress on tough issues related to drug trafficking, cross-border terrorism, and transnational security. An anti-IS alliance running from Tehran to Torkham on the Pakistani border could fend off further terrorist intrusion into South Asia in a way that Saudi Arabian cooperation has been unable to deliver.

Such coordination on security issues could bolster good will between Iran and Pakistan on shared economic interests as well. The trust deficit that resulted between the two countries from the stalled IP gas pipeline project could be restored. Diplomatic tensions could be relieved if Iran granted Pakistani citizens the same right it applies to Indian citizens, the right to visit Iran without a travel visa. Trade between Pakistan and Iran has the potential to grow by $5 billion, but is stymied by under-utilized bilateral mechanisms — namely, a number of joint commissions on road transport, economic relations, and border management. Through progress on security issues and stronger economic ties, Pakistan’s renewed relationship with Iran could potentially benefit the entire region.

Over the next half century, Pakistan will be embroiled in the chaos spilling across the Arabian Peninsula, from sectarianism to state solvency to the growing IS influence that Chief of Army Staff General Raheel Sharif called “a bigger threat than al-Qaeda.” To meet these challenges, Pakistan will have to deploy smarter, bolder, and less parochial foreign policy choices. In her first visit to Islamabad this summer, U.S. National Security Advisor Susan Rice flagged in no uncertain terms the American desire for an Afro-Asian coalition to counter the spread of IS. But before Islamabad joins any U.S.-proposed “Sahel to South Asia” alliances, Pakistani diplomats would be wise to first frame, and then anchor, any future anti-IS policy decisions in a national security narrative that looks beyond decades of partisan Saudi patronage.

In August, the federal interior ministry issued a notification formally outlawing IS; this must be followed by a comprehensive internal review that gives teeth to Pakistan’s National Action Plan with the aim of boosting anti-IS defenses in vulnerable Pakistani cities. The present government will also be better equipped to flex national security and foreign policy muscle if it brings parliament into the decision-making fold — which is what happened when the issue of intervention in Yemen arose — and revitalizes the offices of the National Security Committee, which has met only four times in the past two-and-a-half years.

On the diplomatic front, the Pakistani Foreign Office will have to pay much-needed attention to its MENA desks. A political appointment in Pakistan’s Tehran or Istanbul stations could significantly increase Pakistan’s diplomatic presence in this strategically vital part of the world and capitalize on the strategic as well as commercial potential of three million Pakistanis working in the Gulf.

Pakistan can also look to Indian Prime Minister Narendra Modi as an unexpected role model for strengthening engagement with the Middle East. This year, Modi became the first Indian prime minister to visit the United Arab Emirates in 30 years. In back-to-back meetings over two days, the Indian leader interacted with heads of state, business communities, and Indian expatriates. India’s historical dependence on Gulf oil, together with a growing economy, will likely spell increasing engagement with the Middle East over the next decade. Later this year, Modi is due to visit Tehran, Istanbul, and Tel Aviv (in the case of the latter, becoming the first Indian prime minister to do so).

There are lessons for Pakistan to learn in India’s smart “Link West” approach to the Middle East. But following through on change will require action and sustained commitment, in line with Pakistan’s now well-established interest in regional peace and stability. Given the Islamic State’s steady eastward advance, Pakistan will have to think seriously about rebooting, and executing, an informed Middle East strategy — one that can withstand a new generation of security and diplomatic challenges.

(The writer works for the Jinnah Institute. )