Pakistan's relationship with Saudi Arabia and the UAE is based on close diplomatic ties, but also deep economic relations.
Saudi Arabia is home to more than 1.9 million Pakistanis, mostly unskilled workers, while the UAE hosts a further 1.2 million, according to government data.
Qatar, a much smaller country by comparison, hosts only 115,000 Pakistani citizens.
Those expatriate Pakistanis have a significant impact on their country's economy, with foreign remittances playing an important role in bolstering Pakistan's foreign exchange reserves.
Analysts believe that any attempts to expel Pakistani workers or block remittances could have a major impact on Pakistan's economy.
Saudi Arabia tops the list of countries with the highest remittances to Pakistan, with $4.52bn in funds sent home by Pakistanis in the current fiscal year, according to Pakistan's central bank.
The UAE comes in next at $3.47bn, with Qatar appearing much further down the list with only $304m in remittances.
Saudi Arabia and the UAE are also two of Pakistan's major trading partners. The South Asian country has imported goods and services worth $5.84bn from the UAE in the current fiscal year, and a further $1.95bn from Saudi Arabia, according to the central bank.
It also sold exports worth $852m and $300m to those two countries respectively.
By comparison, Pakistan sold exports worth $42.6m to Qatar in the current fiscal year, while importing $864m worth of goods and services.
The bulk of those imports have been in the form of Liquefied Natural Gas (LNG), after Pakistan signed a landmark 15-year deal with Qatar in February 2016.
In addition, Pakistan's Prime Minister Nawaz Sharif holds close ties with the ruling families in both Saudi Arabia and Qatar. In 2000, when he fled a military coup, Sharif resided in Jeddah, a Saudi Arabian port city on the Red Sea, for eight years while in exile.
The Saudi government also gave Sharif's government a grant of $1.5bn in March 2014 to help meet debt-service obligations and undertake large development projects. At the time, Finance Minister Ishaq Dar termed the grant "a gift".
In more recent times, Sharif has relied heavily upon the testimony of former Qatari Prime Minister Hamad Bin Jasim Bin Jaber Al Thani as a part of his defence in an ongoing corruption investigation at the Supreme Court that could unseat him as prime minister.
"Of all Muslim nations, Pakistan is probably in the most difficult position," James Dorsey, a senior fellow at the S. Rajaratnam School of International Studies in Singapore and specialist on Pakistan's relations with Gulf countries, told Al Jazeera.
Dorsey pointed to the appointment of Pakistan's former army chief Raheel Sharif to lead a 39-member military alliance put together by Saudi Arabia, ostensibly to combat the Islamic State of Iraq and the Levant (ISIL) armed group, as a concession the country was forced to make after refusing to join the war in Yemen.
Tehran and others have criticised the alliance as being focused more on furthering Saudi objectives against Shia-majority Iran in the region than against ISIL.
Roughly 15 percent of Pakistan's roughly 200 million people are Shia Muslims, and the opposition at home was one of the major reasons the country did not send troops to fight the war in Yemen, according to analysts.
Dorsey said the recent rift with Qatar "potentially puts Pakistan in an even tighter spot".
He added: "Obviously Pakistan has a historic relationship with Saudi Arabia, and Saudis are not only very important to them [economically], but also very influential on all kinds of levels. But they also have a very close relationship with the Qataris, economically."
But Dorsey argued that while the relationship with Qatar is strong, Saudi Arabia has more leverage to exert on Pakistan, if push comes to shove.
"There is a lot of Saudi money going into Pakistan. When Pakistan has a financial shortage, there are two places they go: Saudi and China," he said.
"There are a lot of Pakistanis working in Saudi Arabia. […] They could keep the Pakistanis and stop the remittances. And all of this would hit Pakistan quite hard.
Moreover, Saudi Arabia has also embarked on a soft power campaign in Pakistan for decades, said Dorsey, whose research has tracked donations and funding trails from the Gulf kingdom to Pakistani religious organisations.
"Saudi Arabia in the last four decades has waged the single largest public diplomacy campaign in history. […] That campaign was designed to further a Sunni Muslim ultraconservatism world view."
Hasan Askari Rizvi, an Islamabad-based political analyst, said it seems unlikely Pakistan would wade into this regional conflict, not least because of potential political opposition at home.
"I don't think they will sever ties," he told Al Jazeera.
"There will be domestic opposition, there will be political opposition that this is not an advisable strategy to get totally involved in a conflict in the Arab world."
Rizvi's view seems borne out by Thursday's parliamentary resolution, which was moved by key leaders of the country's opposition parties.
Either way, Pakistan will serve as an interesting test case for major non-Arab Muslim states around the world, both analysts said.
Turkey and Iran have already come out in support of Qatar, promising food aid and sending troops to the country this week.
Other countries with major Muslim populations such as Indonesia, Malaysia and Nigeria have remained largely neutral, so far.
Some smaller countries, such as the island nations of Mauritius and Maldives have joined the boycott of Qatar.
"A lot of the Muslim states don't want to get sucked into this," Dorsey said.
"What you'll see is countries will try and muddle through this, maybe take some sort of step [to isolate Qatar], but stopping short of fully taking sides. The Saudis and Emiratis may not find that sufficient, so it remains to be seen what happens if and when [they] try to put Muslim countries against the wall."
By: Asad Hashim