Pakistan and Iran "agreed to de-escalate" tensions Friday, Islamabad said, after trading deadly airstrikes on militant targets in each other's territory this week.
The rare military actions in the porous border region of Baluchistan -- split between the two nations -- had stoked regional tensions already enflamed by the Israel-Hamas war.
Iran carried out a missile and drone attack on what it called "terrorist" targets in Pakistan on Tuesday night, with Pakistan in turn striking militant targets inside Iran on Thursday.
Pakistan recalled its ambassador from Tehran and said Iran's envoy -- on a visit home -- was blocked from returning to Islamabad.
The United Nations and the United States appealed for restraint, while China offered to mediate.
But after speaking by phone, Pakistan's Foreign Minister Jalil Abbas Jilani and his Iranian counterpart Hossein Amir-Abdollahian agreed "close coordination on counter terrorism and other aspects of mutual concern should be strengthened".
"They also agreed to de-escalate the situation," according to a summary of the conversation released by Islamabad's foreign ministry.
After the call, Amir-Abdollahian said in a statement "the cooperation of the two countries to neutralise and destroy terrorist camps in Pakistan is essential".
The muted rhetoric matched analysts' predictions that both sides would seek to defuse the confrontation.
Tehran and Islamabad have both insisted they hit their own domestic militants sheltering on foreign territory.
"The upshot of the new situation is that the two countries are seemingly and symbolically even," said Antoine Levesques, of the International Institute for Strategic Studies.
- Border closure fears -
Meanwhile on Friday, Pakistan Prime Minister Anwaar-ul-Haq Kakar held an emergency security meeting with military and intelligence chiefs.
"The forum reiterated the unflinching resolve that sovereignty and territorial integrity of Pakistan are absolutely inviolable," said a summary released by Kakar's office.
"Any attempt by anyone to breach it on any pretext will be responded with [the] full might of the state."
But the summit also said Pakistan and Iran should "address each other's security concerns in the larger interest of regional peace and stability".
Caretaker leader Kakar cut short his visit to the World Economic Forum in Davos, Switzerland following the strikes, which came with national elections due in three weeks.
A collective death toll of 11 -- mostly women and children -- was reported from both sides of the border that bisects an arid region where militant movements have simmered for decades.
In the remote villages near the strike site in Panjgur district, where mobile signal is rarely available, farmers pieced together the events from reports passed on from visiting security officials who set up checkpoints in the area.
"Helicopters were flying overhead and going in the direction of where the Iranian strike hit, but we didn't know what had happened," Maulana Mohammad Sadiq, 42, the prayer leader of a small seminary around five kilometres (three miles) from where a missile hit, told AFP on Thursday.
Villagers feared that deteriorating relations between the two sides could lead to border closures and cut off residents from Iranian trade, which the area relies on for employment and food imports.
"If Iranians close the border, the people will starve and it will cause more militancy because youth will join the separatist organisations," said 55-year-old Haji Mohammad Islam.
Baluch separatists have been waging a low-level insurgency against Pakistani authorities from the largely ungoverned, impoverished region fighting for a better share of mineral resources.
Rights groups say the military's crackdown on the insurgency has included widespread enforced disappearances and extrajudicial killings.
Militancy has also risen sharply along Pakistan's border with Afghanistan further north, after the Taliban's return to power there in 2021.