Raisi is set to hold talks with top Pakistani leaders as the two nations aim to boost trade and resolve border issues.

Iranian President Ebrahim Raisi is in Pakistan on a three-day trip to discuss regional and bilateral relations days after Iran and Israel carried out attacks against each other, risking the Gaza war to expand into a regional conflict.

Raisi is scheduled to hold talks with top Pakistani leadership, including Prime Minister Shehbaz Sharif, as the two neighbours seek to mend ties after tit-for-tat missile attacks in January.

Local media reported that Raisi will also meet General Asim Munir, the head of Pakistan’s military, which wields huge political and economic influence in the South Asian nation.

What’s the agenda of the trip?

Raisi arrived in the capital, Islamabad, on Monday as the two neighbours aim to boost economic, border and energy ties.

“The Islamic Republic of Iran, in line with the neighbourhood policy … is interested in promoting relations with Pakistan and during this trip, various issues including economic and commercial issues, energy and border issues will be discussed with the government of Pakistan,” a statement by the Iranian presidential office said on Monday.

In a statement issued on Sunday, Pakistan’s Ministry of Foreign Affairs called for improving bilateral ties.

“The two sides will have a wide-ranging agenda to further strengthen Pakistan-Iran ties and enhance cooperation in diverse fields including trade, connectivity, energy, agriculture, and people-to-people contacts,” the statement said.

The Iranian president will visit major cities, including Lahore and Karachi, and focus on bilateral and trade ties, it said.

Mosharraf Zaidi, a partner at advisory services firm Tabadlab and former adviser to the Foreign Ministry, told Al Jazeera in a written statement that Raisi’s trip is “an effort to secure an expression of support from Islamabad and Rawalpindi [military leadership] for Iran – as it stumbles deeper into a dangerous conflict with Israel”.

Zaidi added that Iran’s strategic thinkers are aware that Pakistan has both a domestic political crisis and a growing range of economic compulsions that limit the range of movement on Pakistan’s engagement in the ongoing conflict in the Middle East.

What’s the status of Iran-Pakistan ties?

Iran and Pakistan have a history of a troubled relationship, with both accusing each other of failing to rein in armed groups.

The border tensions escalated in January when Iran carried out air attacks across the border in Pakistan killing two children. The Iranian state media said the attack was targeting two bases of the armed group Jaish al-Adl. Pakistan retaliated by firing a missile into Iranian territory and recalling its ambassador from Tehran.

But the two neighbours decided to de-escalate tensions, with Tehran rushing its top diplomat to Islamabad to mend ties. The two countries agreed to confront the “menace of terrorism” together, especially in the border region. Before Raisi’s visit, Tehran and Islamabad talked about combating “terrorism”.

“At that time, Pakistan had a caretaker government in place. So what Iranians had indicated was that after the new government comes in, there could be a visit to repair the relationship and rebuild confidence,” Muhammad Faisal, a PhD Scholar at the University of Technology Sydney who specialises in Pakistan’s foreign policy, said.

Why is the Pakistan-Iran relationship vital?

Foreign policy analysts in Pakistan have backed re-engagement with Iran despite the border tensions.

“Pakistan has troubled borders with India as well as with Afghanistan. And therefore, to have a normal, stable relationship with Iran has been of utmost importance for Pakistan, and it remains so,” veteran Pakistani diplomat Maleeha Lodhi told Al Jazeera in the wake of the January border tensions.

Islamabad and Tehran have been aiming to boost bilateral trade, which currently stands at more than $2bn.

Faisal told Al Jazeera that there is a sizable informal trade between the two countries, including liquified petroleum gas (LPG) and crude oil. He added that Iran also provides electricity to Balochistan province and other border areas in Pakistan.

In May 2023, Sharif and Raisi inaugurated the first border market at the Mand-Pishin border crossing.

Moreover, the two neighbours have close cultural and religious ties, with tens of thousands of Shia minority people from Pakistan going to Iran every year on pilgrimage.

However, Tabadlab’s Zaidi said common cultural bonds and a long border – 900km (559 miles) – have not translated into people-to-people exchanges and deep trade ties.

“Instead, trade is mostly outside the formal domain and travel is restricted to religious tourism,” he said.

On the eve of his trip, the Iranian president set a target of $10bn in bilateral trade, saying the level of economic relations between the two countries is not equal to the level of political relations. Last August, they had set the bilateral trade target at $5bn.

A plan to build a pipeline to export Iranian natural gas to Pakistan has been stalled amid opposition from the United States, which has slapped a wide range of sanctions on Tehran over its nuclear programme.

Faisal, from the University of Technology Sydney, said the Pakistan-Iran gas pipeline might be discussed during the talks.

How has Pakistan responded to Iran-Israel tensions?

On April 14, a day after Iran’s strikes on Israel, Pakistan’s Foreign Ministry issued a statement calling for de-escalation. The statement deemed the events “the consequences of the breakdown of diplomacy”.

“These also underline the ‘grave’ implications in cases where the UN Security Council is unable to fulfil its responsibilities of maintaining international peace and security,” the ministry statement said.

It further said Pakistan underlined the necessity of international efforts to prevent further hostilities in the region and for a ceasefire in Gaza.

“It’s now critically urgent to stabilise the situation and restore peace. We call on all parties to exercise utmost restraint,” the statement concluded.

Pakistan does not recognise Israel and does not have direct channels of communication with it.

“In recent years, there has been growing conjecture about pressure from GCC [Gulf Cooperation Council] countries on Pakistan to make changes to its Palestine policy. There is no indication that such a change is on the cards,” Zaidi said.