Pakistan's parliament has decided not to join the Saudi-led coalition targeting Shiite rebels in Yemen, with lawmakers adopting a resolution calling on the warring parties to resolve the conflict through peaceful dialogue.

After days of debating, Pakistani politicians unanimously voted in favour of a resolution saying that the parliament desires "Pakistan should maintain neutrality in the Yemen conflict so as to be able to play a proactive diplomatic role to end the crisis".

The predominantly Sunni Pakistan, which has a Shiite minority of its own and shares a long border with the Shiite powerhouse Iran, has been concerned about getting involved in Yemen's increasingly sectarian conflict and a Saudi-Iran proxy war in the region.

The conflict in Yemen pits the Saudi-led Sunni Gulf Arab coalition against Shiite rival Iran, which supports the rebels known as the Houthis and has provided humanitarian aid, though both Iran and the rebels deny it has armed them.

The growing regional involvement risks transforming what until now has been a complex power struggle into a full-blown sectarian conflict like those raging in Syria and Iraq.

Since the Saudi-led coalition launched the aerial campaign more than two weeks ago, pro-Saudi groups have rallied across Pakistan, urging Islamabad to join the coalition. The rallies, organised by a militant-linked Sunni group and Hafiz Saeed, who heads the Jamaat-ud-Dawa religious group, have condemned the Shiite rebels' advance in Yemen.

Pakistan's parliament resolution came a day after Iranian foreign minister Mohammad Javad Zarif visited Pakistan to discuss the conflict in Yemen with Pakistani prime minister Nawaz Sharif and other officials.

Mr Zarif said, after the talks, that Iran is ready to facilitate peace talks that would lead to a broad-based government in Yemen. He also called for a ceasefire to allow for humanitarian assistance. "We need to work together in order to put an end to the crisis in Yemen," Mr Zarif said.

Mr Sharif attended the joint session of parliament to indicate his approval.

If the conflict in Yemen becomes an all-out sectarian war, this will "have a critical fallout in the region, including in Pakistan", the resolution said.

The parliament also urged Muslim countries and the international community to intensify their efforts to promote peace in Yemen. It called on Pakistan's envoys to "initiate steps" before the UN Security Council "to bring about an immediate ceasefire in Yemen".

Even though the politicians opted to stay out of the conflict, the parliament also expressed its "unequivocal support" for Saudi Arabia, vowing that in case of any violation of its territorial integrity or any threat to the Muslim holiest places in the kingdom, Pakistan would "stand shoulder-to-shoulder with Saudi Arabia and its people"