Iranian president Ebrahim Raisi held talks with Pakistani leader Shebaz Sharif in Islamabad on Monday, in what experts said was a "significant" visit aimed at mending ties after the neighbours traded deadly cross-border strikes earlier this year.
Prime minister Sharif's office said the pair had a "vibrant discussion" on advancing bilateral relations -- specifically in trade and communication -- and also "agreed on the necessity for joint efforts by both countries to combat terrorism".
The three-day visit follows tit-for-tat missile strikes in January in the region of Balochistan, which straddles the two nations' porous border.
Pakistan's foreign ministry also released photos of top diplomat Ishaq Dar meeting with Raisi, saying in a statement that the pair "discussed regional and global developments and affirmed commitment to peace and constructive dialogue".
Before leaving Tehran, Raisi had said the "discussions with the government of Pakistan will be on the border issues between the two countries".
The three-day visit follows tit-for-tat missile strikes in January in the region of Balochistan, which straddles the two nations' porous border.
Tehran carried out the first strikes against an anti-Iran group inside Pakistan, with Islamabad retaliating by hitting "militant targets" inside Iran.
Both nations have previously accused each other of harbouring militants in the border region.
Raisi's visit is an "opportunity to put the relationship back on track and to repair the damage that was done" in January, said Maleeha Lodhi, a former Pakistani diplomat and foreign affairs analyst.
"A key challenge is border management, as there are militants on both sides of the Pakistan-Iran border, so the visit may yield some agreement on this," Lodhi said.
Tehran carried out the first strikes against an anti-Iran group inside Pakistan, with Islamabad retaliating by hitting "militant targets" inside Iran.
A visit to Islamabad by Tehran's foreign minister in late January led to the two sides pledging to improve dialogue and install liaison officers.
Raisi's trip seeks to "diminish mistrust" between the neighbours, said security analyst Qamar Cheema.
"But the visit is also significant in commercial terms. We foresee forthcoming enhancements in border management and a transition towards more formalised trade practices, thereby mitigating informal trade and smuggling activities along the border region," Cheema added.
Raisi has said the visit is also aimed at boosting overall trade between the countries, which currently stands at around $2.5 billion a year.
Pakistan is counting on a joint gas project with Iran to solve a long-running power crisis that has sapped its economic growth.
Tehran has constructed its portion of the 1,800-kilometre (1,100-mile) pipeline intended to connect its South Pars gas fields to Nawabshah in Pakistan, close to Karachi.
Pakistan's caretaker government sanctioned an 80-kilometre pipeline section in February to prevent hefty penalties owed to Iran from prolonged project delays.
Washington has warned the pipeline could violate sanctions on Iran, and that Pakistan could face sanctions itself if the project goes forward.