Why is Pakistan involved in a US-Iran peace deal?
Pakistan has played a key role in efforts to halt war between Iran and the United States, with Prime Minister Shehbaz Sharif announcing a deal and "immediate and permanent" end to military operations this week.
Pakistan signalled it will continue to lay the groundwork for further talks, with a signing ceremony scheduled in Switzerland on June 19.
- How did Pakistan take a central role? -
In March, several weeks into the war, Islamabad confirmed it was relaying messages back and forth between Tehran and Washington.
Pakistan's push to get the warring sides to the negotiating table was met with praise and some surprise.
For those watching closely, however, the development made sense.
"The main thing was the mediator's credibility. Pakistan fitted the bill, as it enjoyed the trust of Iran and the US," Islamabad's former ambassador to Tehran, Asif Durrani, told AFP.
Ties between Iran and Pakistan run deep. The two share a 900-kilometre (560-mile) border and cultural links, with Sunni-majority Pakistan home to the world's second-largest Shia population after Iran.
Islamabad's relationship with Washington is significant, but thorny. Pakistan provided NATO supply routes and received billions in US aid during the Afghanistan war, an arrangement that soured when US forces killed 9/11 mastermind Osama bin Laden on Pakistani soil in 2011.
Islamabad also has a defence agreement with regional heavyweight Saudi Arabia and "ironclad" ties with China, Iran's top trading partner.
- Who is the fronting peace efforts? -
Pakistani army chief Asim Munir's personal relationships have elevated Islamabad's influence. As a powerful regional military leader, Munir was familiar with Iran's Revolutionary Guards commanders.
He shares close rapport with Donald Trump, who refers to Munir as his "favourite field marshal" following their acquaintance in the aftermath of conflict with India that the US president helped mediate.
Munir, a former intelligence chief, took up his tenure as army head in 2022. His international rise has coincided with a consolidation of military power in Pakistan, which has seen the field marshal given an extended term.
- What did Islamabad achieve? -
Hopes of a deal were raised, then dashed, continuously since Pakistan announced a temporary ceasefire in April, followed by historic talks in its capital between Iranian and US delegations that ended without agreement.
Pakistan then hit the diplomatic circuit, its leaders holding dozens of calls and meetings with regional players including Riyadh, Doha and Beijing as well as trips to Washington and Tehran.
Fighting flared up throughout, often just as officials signalled progress.
The sides disagreed bitterly on terms around Iran's nuclear programme, sanctions and the Strait of Hormuz.
"The mediation process... was undoubtedly tiring and tedious," said Durrani.
"Pakistan has traditionally enjoyed a positive reputation for its use of language in bilateral and multilateral negotiations," the former ambassador added, skills that had "come in handy".
Qatar, a long-time mediator in global conflicts, ramped up involvement in recent weeks, coordinating with Pakistan whose premier thanked Doha as "brothers in this mediation effort".
- What motivated Pakistan? –
The Middle East crisis brought spiking inflation and the risk of spiralling conflict close to home for Pakistan.
It left Islamabad facing once again the prospect of war in a nation on its border across from southern Balochistan, where authorities are already dealing with a growing insurgency.
Pakistan is also keen to gain international support in conflicts with two of its neighbours, Afghanistan and arch-rival India, which is threatening to cut off critical waterways.
"Pakistan has demonstrated conclusively that India's efforts to isolate Pakistan on the global stage have failed," said Michael Kugelman, senior South Asia fellow at the Atlantic Council.
- What next? –
"By successfully projecting itself as a peacebroker and a peacemaker it was able to change the views of many within the international community, which viewed Pakistan as a troubled state that lacked influence," Kugelman said, adding the country's militancy challenges had caused a "global image problem".
Pakistan is likely hoping it can attract investment and the go-ahead for a major gas pipeline from Iran that is stalled by US sanctions.
The process is far from over, with the initial deal yet to canvas the most contentious points on Iran's nuclear programme, requiring further diplomacy but also challenges for Islamabad.
"Pakistan was very open in public in embracing its role as a mediator which certainly subjected it to certain risks, such as being viewed as the fall guy if things went downhill," Kugelman said. "But it was willing to take on that risk."
U.al-Balawi--al-Hayat