Pakistani Prime Minister Muhammad Nawaz Sharif, right, addresses a joint session of parliament this week in Islamabad. (AFP Photo/PID)

— ­Pakistan’s Parliament voted unanimously Friday to remain neutral in the conflict in Yemen, a major blow to Saudi Arabia as it seeks to build support for its offensive against the surging Houthi rebels there.

The legislature’s decision came after five days of debate in which lawmakers expressed major concerns that Pakistan’s 550,000-man army could become entangled in an unwinnable conflict.

On Monday, Pakistan’s defense minister, Khawaja Muhammad Asif, said Saudi Arabia had ­requested that Pakistan send troops, ships and warplanes to help it battle the Iranian-backed rebels in Yemen. But several Pakistani political leaders were strongly opposed to the request, saying the crisis in Yemen didn’t pose an immediate threat to ­Saudi Arabia.

Instead, the resolution approved by Parliament warned that the Yemen crisis “could plunge the region into turmoil” if a negotiated peace and settlement is not reached soon.

“This bombing needs to be stopped, because as long as this is happening, the peace process can’t be launched,” Mohsin Khan Leghari, a Pakistani senator, said Friday on the floor of Parliament.

Under Pakistan’s constitution, the resolution is nonbinding, because the prime minister has complete authority over the country’s armed forces. But Prime Minister Nawaz Sharif said this week that he planned to leave the matter to Parliament. The members of Sharif’s Pakistan Muslim League-N party supported the resolution, suggesting it has his backing.

After Saudi Arabia launched airstrikes in Yemen late last month, there was widespread speculation that Pakistan would also provide assistance to its long-time ally. Over the past four decades, Pakistan has repeatedly dispatched troops to Saudi Arabia to help it defend its borders or clamp down on internal dissent.

By choosing to stay neutral in the Yemen conflict, Pakistan is likely to test the country’s strategic and cultural relationship with one of its oldest allies.

Sunni Muslims are the overwhelming majority in both countries. Saudi Arabia has also provided extensive financial help to Pakistan over the years, including a $1.5 billion loan last year to shore up the faltering rupee.

Sharif has deep personal ties to Saudi Arabia, where he took refuge when he was ousted in a military coup during a previous term as prime minister in the late 1990s.

But during this week’s debate in Parliament, lawmakers said the Pakistani public has grown tired of war.

With the 13-year war in neighboring Afghanistan winding down, several lawmakers said the public is wary of becoming even tangentially involved in another foreign war.

“Yes, the decision could have some impact on bilateral relations” with Saudi Arabia, said Amir Rana, an Islamabad-based defense and security analyst. “However, the Saudis understand that this is from Parliament, which reflects broadly the Pakistani public opinion.­ . . . For the first time, a decision about troops in the Middle East has been taken that is in line with public sentiments.”

Rana said he doubts that Pakistan’s decision will greatly affect Saudi Arabia’s military calculations in Yemen. Though Pakistan could have infused the effort with fresh resources, Rana said he thinks the Saudi military is capable of eventually repelling the rebels through airstrikes.

“Saudi Arabia won’t occupy Yemen,” Rana said.

Still, Pakistani lawmakers are nervous that the unrest in Yemen could broaden into a larger conflict between Saudi Arabia and Shiite-dominated Iran. Lawmakers said that would only heighten sectarian tensions in Pakistan, where Shiites make up about 20 percent of the population.

Pakistan has been trying to stabilize its relationship with Iran, including the building of a pipeline that could supply ­energy-starved Pakistan with much-needed Iranian natural gas.

“Sending troops to a conflict zone would be disastrous for Pakistan’s own stability,” said Ayaz Soomro, a senator. “Pakistan is a leading Muslim state and a nuclear power, and we shall use this leverage to take along all other Islamic countries for a peaceful settlement to the Yemen conflict.”

The Pakistani vote came a day after Iranian Foreign Minister Mohammad Javad Zarif left ­Islamabad after two days of meetings.

On Thursday, Zarif urged Sharif to remain neutral in the conflict and instead work toward a cease-fire. Sharif told Zarif that Pakistan had serious concerns that Iran was meddling in Yemen, according to Sharif’s spokesman.

But Pakistani leaders also worry that the tension in Yemen could undermine efforts to reach a final agreement between Iran and the United States and five other nations over Iran’s nuclear program. That deal could bolster Pakistan’s security by sparing it another nuclear-armed neighbor.

In addition, the related lifting of international sanctions on Iran could expedite the planned gas pipeline.

Imtiaz Gul, director of the Center for Research and Security Studies in Islamabad, said Parliament has given Sharif’s government political cover to avoid getting caught up in the broader jockeying between Saudi Arabia and Iran for influence in the Middle East.

“Bringing the matter to Parliament was an intelligent move,” Gul said. “They now have an excuse to stay out of the Yemen war. I don’t know whether it was by design or by default, but it provided them with good escape, and the government played it well.”

The 12-point resolution says Pakistan will support international efforts to broker a cease-fire and will push for increased humanitarian aid to Yemen. Sharif said this week that he is particularly eager to work with Turkey, another Sunni-dominated country that appears to be balking at Saudi Arabia’s request for military support, in finding a peaceful resolution to the crisis.

Pakistan will reconsider its neutrality stance, however, should the conflict spill over into Saudi Arabia, Parliament decided.

“In case of any violation of its territorial integrity or should there be any threat to [Islamic holy sites in Saudi Arabia], the people of Pakistan will stand should-to-shoulder with Saudi Arabia and its people,” the resolution states.

Shaiq Hussain contributed to this report.

Read more:

Today's coverage from Post correspondents around the world