Pak PM Imran Khan cautioned the United States on the outcome of a conflict in Iran (File Photo)

Cautioning the United States about any misadventure against Iran, Pakistani Prime Minister Imran Khan on Tuesday said any action on the lines of Iraq could be much worse and people would "forget al-Qaeda".

"My worry about Iran is.... I am not sure whether all the countries realise the gravity of the situation if there is a conflict with Iran," Mr Khan said in response to a question during his appearance at the US Institute of Peace, a think-tank funded by the US Congress.

"You know, this is not going to be the same as (the 2003 US invasion of) Iraq. This could be much, much, much worse.... It could unleash terrorism, which -- people would forget al-Qaeda.... You know, the battle might be quite short if it goes ahead, bombing airfields and so on," he said.

"But the consequences after that, my worry is that not many people fully understand it. And I would strongly urge that there should not be...another military situation," Mr Khan said amidst an escalation of tension between Iran and the United States.

"We would do anything, I mean, if (there is) any role Pakistan can play in this. We have already suggested this to Iran," he said.

"Until recently, Iran was willing but then, somehow I felt Iran is getting very desperate. And I do not think they should be pushed into a situation where this leads to a conflict," Mr Khan added.

Responding to another question on Afghanistan, he said his government had decided to put an end to the decades-old policy of interfering in Afghan politics to avert the danger that Pakistan might someday confront an Afghan-Indian alliance.

"The fear amongst the Pakistani military establishment was always that there would be a two-front situation...you know, the eastern front, which is India. And then, if Afghanistan was also in the Indian sphere of influence, then Pakistan would be sandwiched between these two," Mr Khan said.

The Pakistani security doctrine had sought "what was called the 'strategic depth' of being able to influence Afghan affairs", he said, adding, "But this has changed. Today, we feel that by interfering in Afghanistan in order to secure the strategic depth, we have actually done a lot of damage to our own country and...we have become partisan in Afghanistan's internal affairs."

Imran Khan, who was accompanied by his top military officers during his three-day official trip to the US, said he spoke for Pakistan's army in saying that "we should not ever interfere in the internal affairs of Afghanistan".

"Let the Afghans decide what they want, what sort of government they want and we should facilitate the peace process. So, this is the big difference. Now, we are all on the same page. And fortunately, now the United States is on the same page too," he said.

The visiting Pakistani prime minister said he had previously declined to meet the Afghan Taliban leaders, following objections by the Afghan government.

"But now, when I go back after meeting President (Donald) Trump, and also, I have spoken to (Afghan) President (Ashraf) Ghani, now I will meet the Taliban and try my best to get them to talk to the Afghan government," he said.

Eventual peace talks, Mr Khan said, should lead to "an inclusive (Afghan) election where the Taliban...also participate."

