Leaders of Pakistan and Iran hold talks in Tehran as part of initiative by Islamabad to defuse rising Gulf tensions.

Imran Khan and Hassan Rouhani have held talks in the Iranian capital, Tehran, as part of a Pakistani initiative to defuse rising tensions in the Gulf and mediate between regional foes, Iran and Saudi Arabia.

Khan, Pakistan’s prime minister, arrived in Tehran on Sunday – the first leg of a tour that also includes a stop in Saudi Arabia.

“The reason for this trip is that we do not want a conflict between Saudi Arabia and Iran,” Khan told reporters as he stood alongside the Iranian president.

Emphasising the visit to the two countries were Pakistan’s “initiative”, he said: “We recognise that it’s a complex issue … but we feel that this can be resolved through dialogue. But what should never happen, is war between Saudi Arabia and Iran.”

Frictions between Tehran and Riyadh have spiked following a September 14 attack on Saudi oil facilities.

The United States and Saudi Arabia blamed Iran for the assault on the Abqaiq and Khurais facilities, a claim Tehran denied. Then, on Friday, an Iranian-flagged oil tanker was damaged by two separate explosions off the Saudi port of Jeddah, raising fears of a further escalation.

Iran said it was conducting an investigation and Saudi Arabia said it was not behind the suspected strike.

The Sabiti was the first Iranian vessel to be hit since a series of attacks targeting oil tankers in the Gulf waters in June and July. All of this comes against the backdrop of a bitter standoff between the US and Iran over Tehran’s nuclear and missiles programmes.

The two countries have been at loggerheads since the US withdrew from the landmark 2015 Iran nuclear deal in May last year, and reimposed punishing sanctions on the Islamic republic.

Khan told reporters on Sunday that US President Donald Trump had approached him to “facilitate some sort of dialogue between Iran and the United States”.

‘Massive task’

But Rouhani repeated Iran’s official line that the US must return to the nuclear deal and lift sanctions before any talks can take place.

“Any goodwill gesture and good words will be reciprocated with a goodwill gesture and good words,” he said, stressing on the need for political dialogue to resolve the region’s conflicts.

The Iranian president also expressed his concern over the “incidents happening to oil tankers, especially the Iranian oil tanker in the Red Sea on Friday”.

“If a country thinks that it can cause insecurity in the region and not receive a proper response, it is mistaken,” he said, adding that he had presented Khan with evidence from the incident.

The Pakistani leader said he was “very encouraged” by talking to Rouhani and would go to Saudi Arabia “in a very positive frame of mind” hoping the two countries can “iron out their differences”.

Khan is due to travel to Riyadh on Tuesday to continue the mediation effort.

Pakistan has strong relations with Saudi Arabia, with more than 2.5 million of its nationals living and working in the kingdom. It also maintains good relations with Iran and represents Tehran’s consular interests in the US.

Al Jazeera’s Assed Baig, reporting from Tehran, said it was uncertain as to how Iran and Saudi Arabia will move forward, given their differences on other regional issues, including the war in Yemen where they support different parties.

“Tensions are still high. It’s massive task ahead of them,” said Baig, adding: “[Rouhani] said that there should be an end to the war in Yemen … he said there should be an immediate ceasefire and humanitarian assistance.”

Saudi Minister of State for Foreign Affairs Adel al-Jubeir said on Sunday that Riyadh had not asked Islamabad to mediate.

The minister told reporters in Riyadh that the Pakistani prime minister was acting “on his own initiative” and said Iranians needed “to change their behaviour, their policies if they want countries to deal with them as with normal countries”.

He added that Saudi Arabia was not responsible for the attack on the Iranian vessel.

“We did not engage in such behaviour at all. This is not how we operate and that’s not how we did [it] in the past.”

On Saturday, Iran signalled again that it was not averse to clearing up its differences with the Saudis.

“With or without mediators … we are ready to negotiate with the Saudis,” said Abbas Mousavi, spokesman for the Iranian foreign ministry.