Pakistan’s delicate power-sharing agreement between the military and the civilian government is starting to break down, with the military inserting itself rather aggressively into civilian affairs after the recent Lahore bombing. But the power struggle is playing out on geopolitical issues too, according to The New York Review of Books:

In recent days, tensions between the army and the government have escalated on other fronts, including Pakistan’s recent diplomacy with Iran. Amid the Lahore bombing crisis, the army disclosed that it had caught an Indian spy working to destabilize the province of Balochistan. The spy, Kulbhoshan Yadav, was said to be a retired Indian naval officer, and had lived many years in Iran from where he travelled to Pakistan.

The timing could not have been worse. Iranian President Hassan Rouhani had just been on his first state visit to Pakistan and Nawaz Sharif was negotiating for Iranian oil, gas, and electricity contracts. Asserting his prerogative over foreign policy, General Sharif said that in his meetings with the Iranians he had criticized them for allegedly hosting Indian spies. Meanwhile he announced the capture of the spy. The Iranians left angry (though Rouhani denied the discussions), while the Pakistani prime minister was again shown to be largely powerless.

The army wants a tougher anti-Iran line than the civilian politicians and, if history is any guide, we should expect that the army will get what it wants. Civilian politicians have made a lot of noise about resisting Saudi attempts to bring Pakistan into an anti-Iran alliance, but there are signs the military—which likes the idea of Gulf funding at a time when the U.S. seems increasingly disenchanted with Pakistan—is more interested in working with Riyadh. It may also strike some people in the security establishment in Pakistan that refocusing the country’s assorted jihadis and terrorists on anti-Iran, anti-Shi’a activities in Afghanistan and Baluchistan may be a productive way to harness the the energies of groups that create headaches for Pakistan’s leaders and which frequently attack Pakistani civilians.

With Iran and Saudi Arabia fighting each other in a battle for dominance, it’s worth keeping an eye on who lines up behind whom in a part of the world that continually proves itself capable of becoming even more volatile.