Abu Dhabi // The appointment of the recently retired Pakistan army chief as commander of a Saudi-led military alliance of Muslim countries is a significant – if for now symbolic – shift by Islamabad away from its strategy of balancing relations with Riyadh and Tehran.

As tensions between the rival regional powers have increased amid proxy conflicts across the Middle East over the past few years, Pakistan has sought to remain neutral and protect itself from any spillover of the region’s turmoil.

Despite its close partnership with Saudi Arabia, Islamabad has also sought to maintain positive relations with Iran and even enhance them, with an eye to increasing trade and energy imports from its neighbour.

Pakistan, with the backing of parliament, even risked badly strained ties with Saudi Arabia and the UAE, when it declined to contribute forces to the Saudi-led coalition fighting Iran-backed rebels in Yemen in April 2015.

In December 2015 the Saudi defence minister, deputy crown prince Mohammed bin Salman, announced the formation of an alliance of Muslim-majority countries – which now numbers 40 – ostensibly aimed at fighting extremist groups like ISIL, but widely seen as a show of force against Tehran.

Pakistan is a member of the Islamic Military Alliance to Fight Terrorism and participated in related military exercises in the kingdom in last February, while officials maintained that concrete contributions would depend on further clarifications and details from Riyadh.

But Pakistan’s defence minister, Khawaja Muhammad Asif, confirmed over the weekend that former chief of army staff retired general Raheel Sharif had been appointed the alliance’s military commander, a move that makes Pakistan – the only Muslim nuclear power – the face of the Saudi effort.

Mr Asif said last year that there were 1,180 Pakistani troops based in the kingdom to provide training and advice, after Riyadh in 2015 reportedly requested a larger deployment of Pakistani soldiers to the country, in part to bolster its own less experienced forces against ISIL. One western diplomat based in the Gulf said the number of Pakistani troops in Saudi Arabia was much higher than the figure given by Mr Asif.

Mr Asif said in an interview to Pakistani media that his government had consented to Gen Sharif’s new appointment, and the fact that it comes so soon after his retirement suggests the decision was one taken by the state rather than a personal move by the general.

“This certainly suggests that Pakistan has moved away from its very successful positioning in terms of playing the middle on Saudi Arabia and Iran and signalling to the Saudis that they’re with them but without really doing much for them,” said Moeed Yusuf, an expert on Pakistan at the US Institute of Peace in Washington.

Pakistan is historically adept at negotiating over Saudi demands, and is also reliant on Saudi aid and other concessions, but what has changed is that Islamabad’s foreign policy is currently being driven primarily by a desire to counter India’s stated aim of isolating Pakistan globally.

New Delhi took advantage of the Pakistan-Gulf tensions over Yemen to try to appear to enhance ties with the GCC at Islamabad’s expense. Iran and India have also strengthened economic relations since oil sanctions were lifted last year, and the two countries are developing Chabahar port in Iran as a rival to the Chinese-built Gwadar port that is the keystone of a trade corridor linking the Arabian Sea to western China on which Pakistan has bet its economic future.

Last week, India’s army chief Gen Bipin Rawat said that “we are also carrying out actions to negate the nexus … between China and Pakistan”.

Iranian president Hassan Rouhani made his first state visit to Pakistan last March, but it was overshadowed by allegations by the Pakistani military that an Indian spy had crossed into the country from Iran. Pakistani officials were frustrated that Mr Rouhani or other senior figures did not say unequivocally that “Iran is not going to play the game of isolating Pakistan in terms of India, Iran, Afghanistan joining hands”, Mr Yusuf said. “Iran has been very reluctant to do that, and in fact has not done that at all.”

In the context Indian attempts to isolate Pakistan, Gen Sharif’s appointment may be a signal of the depth of Islamabad’s displeasure with Tehran over its growing ties with India.

This dynamic may change, however, if Washington’s relations with Iran deteriorate under president-elect Donald Trump, who has appointed a number of Iran hawks to key national security positions. Mr Trump may ask strategic ally India to walk away from Iran, which may change the dynamics between Tehran and Islamabad.

While Gen Sharif’s new role is symbolically important, it is still unclear what Pakistan will contribute to Riyadh’s alliance. With a quarter of its 190 million population Shiite, the politics that prevented Islamabad from involvement in Yemen would likely undermine attempts to contribute significant numbers of troops or to deploy them in combat in the Middle East.

“Pakistan cannot be strategically sucked into the Middle East and that has to be its number one goal if it’s going to do this well,” Mr Yusuf said of its participation in the Saudi alliance.

tkhan@thenational.ae