The re-election of Hassan Rouhani as Iran’s president had delivered a historic defeat to the hardliner groups in the country and had given a solid stamp of approval to his brand of “moderation” at home and “engagement” abroad. However the June 7 terror attacks in Tehran, executed by the Islamic State (IS) have rattled that premise. The attack on two symbols of Shia state have sparked a resurgence of anti-Saudi and anti-US nationalism; the religious and hardliner groups that were forced to recede to the background after the election are back to the fore criticising Rouhani’s “soft” approach on foreign policy, especially towards Saudi Arabia. With the rest of the Middle East arranging itself starkly around the Saudi-Iran divide the scene is set for turbulent times – Pakistan must chart a sure and prudent course for the coming upheaval.

This maybe the first major terror attack inside Iran since the 1980s, but the battle between Sunni groups like IS and Shia-militias has been playing out in Pakistan for a while now. Even before IS rose to prominence and wrestled the title of chief terror group from Al-Qaeda, Pakistan had been a battleground in a proxy war between the two sects. Attacks against Shia shires in Pakistan are more frequent and more deadly, and with the conflict between the schisms ramping up the escalation of this shadow war is on the cards.

While the state will try – and is trying – to counter IS and other terrorist groups at home, its handling of the diplomatic balancing act between the Middle Eastern divide is less straightforward. Recent developments will pit the country in strong headwinds which will try to force it into picking a camp; navigating through them to remain neutral and perhaps offering a modicum of leadership to force conciliation is Pakistan’s objective. A difficult one surely, but one that must be explicitly stated and stuck to no matter what comes.