Anthony Bubalo recently lamented that alliances and enmities in the Middle East are becoming so complex that even long-term watchers are struggling to keep up. Well, if that's the case, Pakistan just added to the layers of confusion.

Last month, Pakistan surprisingly refused to join its long-time ally and benefactor Saudi Arabia in its intervention to combat Houthi rebels in Yemen. As the royal kingdom sought to build its coalition, most analysts believed Pakistan's involvement was a foregone conclusion. 

There were many reasons to make this assumption. Pakistan Prime Minister Nawaz Sharif spent much of his time in exile in Riyadh and may owe his political career and even his life to the deft diplomacy of the royal family (in 1991 1999, Nawaz and his brother Shahbaz were provided sanctuary in Saudi Arabia after General Pervez Musharraf seized power in a military coup).

Beyond these close personal ties, the Saudi-Pakistan relationship has been extremely close since the 1960s, when Saudi King Faisal sought to consolidate the Gulf state's position as a leader of the Muslim world by bringing the newly established Pakistan into its orbit.

Military links also grew rapidly. In 1969, Pakistani pilots flew Saudi jets to thwart Yemeni incursions into the kingdom, and throughout the Cold War Pakistani troops were stationed in the royal kingdom to defend Saudi territory. In 1991, Pakistan deployed troops to the kingdom during the first Iraq War. Most recently, Saudi Arabia gave an 'unconditional loan' to the new Nawaz Government to shore up its foreign exchange reserves. So it seemed logical that, in what is often described as a patron-client relationship, Islamabad would be there for its benefactor. 

But there are several obvious reasons why Pakistan declined, and few of them point to a fundamental shift in Pakistan's strategic outlook. Indeed, they reflect continuity in Pakistan's handling of the Middle East.

First, Pakistan's military does not want to commit troops at a time when its own resources are severely stretched. Put simply, being dragged into a potentially lengthy conflict in Yemen when it is combating its own internal insurgency, while the drawdown in Afghanistan is occurring and when relations with India over Kashmir are strained, is not in the military's interests (nor possibly within its capacity). 

That said, a symbolic or token offering could have placated the Saudis and reassured it of Pakistan's ongoing commitment. Pakistan could, for example, have helped enforce UN sanctions by providing assets to strengthen the naval blockade against the Houthi rebels in Yemen (that may still be on the cards). 

But Pakistan's leadership instead insisted on taking a publicly neutral stand, which no doubt perturbed the Saudis. On 15 April, Pakistan's National Assembly tabled and passed a resolution underlining the Government's neutrality on Yemen. The resolution was followed by an earnest string of visits of the top civilian and military leadership to Riyadh to soothe the blow.

Second, despite its close ties to Riyadh, Pakistan has often been reluctant to become embroiled in sectarian-driven geo-political clashes in the Middle East. In the Iraq-Iran war, Pakistan took steps to remain neutral (or at least appear to be). And it declined Saudi Arabia's request to provide troops to help quell Shia uprisings in Bahrain in 2014. 

As a state created in the name of Islam but heavily divided along ethnic, linguistic and tribal lines, Pakistan has not experienced the same level of sectarian divisions as many Arab states. As such, there is strong opposition in Pakistan to fighting other states' sectarian battles or to getting entangled in conflicts beyond its near neighborhood. 

Third, an estimated 25% of Pakistan's own Muslim population is Shia. While the history of sectarian relations has generally been calm, this is changing. Pakistan's Shia population has increasingly become a target for militant anti-Shia outfits. Sustained attacks have also occurred on Pakistan's Shia Hazara population in Balochistan. Pakistan's leaders (many of whom are Shias themselves) know that becoming involved in Yemen could risk fueling further Sunni-Shia violence.

Fourth, Pakistan has always been reluctant to antagonise Iran and has long tried to walk the delicate line between Saudi and Iranian pressures. Pakistan shares a 565-mile  border with Iran, and relations, while not hostile, have always been strained due in part to Islamabad's close relationship with Riyadh. Over the years there has been low-level proxy violence along the border and the commercial relationship has been difficult, with the two states failing to construct the 'peace pipeline' that would allow Pakistan to access Iran's plentiful gas reserves.

As the P5+1 nuclear agreement comes into effect, Islamabad will want to capitalise on the opening of Iran's economy, and is cognizant that being involved in Yemen may set back relations.

Finally, Pakistan is ultimately a pragmatic player. Pakistan has enjoyed a flurry of diplomatic activity in recent months (including visits from Iran, Turkey and China). It is enjoying renewed attention after relations with the US soured and lost momentum.

Late last month, President Xi Jinping announced the China-Pakistan Economic Corridor project worth $46 billion, and there are reports that China may be looking to provide financial backing for the construction of Pakistan's part of the gas pipeline with Iran. While neither initiative is linked to the Yemen situation, China has been pushing for a political solution in Yemen, so it may have factored into discussions. At the very least, it suggests there are rewards for Pakistan in remaining neutral.

The Middle East landscape does appear increasingly complex, but for Pakistan the game remains much the same. It will always leverage opportunities to its own advantage, and its loyalties will usually go to the highest bidder.

Photo courtesy of Government of Pakistan, Press Information Department.