It would be a "disaster" for the Gulf countries if there's a conflict between the U.S. and Iran, Pakistan's prime minister said on Wednesday.

"The impact a conflict would have, I repeat, on the oil prices. It just ... would be a disaster for the whole area," Pakistan Prime Minister Imran Khan told CNBC's Hadley Gamble at the World Economic Forum in Davos, Switzerland.

When asked if he thinks U.S. President Donald Trump wants dialogue with Tehran, Khan said that would be "sensible."

"Just look at Afghanistan, it's almost now 19 years," he said. "We're still finding a solution, still trying to get peace talks going."

"Does the U.S. want another conflict?" he asked. "Trust me, Iran will be (a) much, much more difficult conflict than even Afghanistan."

Tensions in the region escalated in early January after Iran's top military general Qasem Soleimani was killed in Baghdad by an American airstrike. Tehran retaliated by firing ballistic missiles at U.S. targets in Iraq, but both parties appear to have stepped back from further military actions.