KABUL (Reuters) - Afghanistan will return its ambassador to Islamabad after Pakistan clarified Prime Minister Imran Khan’s remarks that Kabul had deemed to be political interference, the Afghan foreign ministry said on Thursday.

Slideshow ( 2 images )

Khan told Pakistani journalists on Monday that forming an interim Afghan government would smooth peace talks between U.S. and Taliban officials, according to published comments.

The Afghan government recalled ambassador Atif Mashal from Islamabad the next day and demanded an explanation for remarks that it called “irresponsible.”

The U.S. ambassador to Afghanistan, John Bass, also rebuked Pakistan. In a tweet on Wednesday addressed to Khan, Bass told the reknowned former cricketer not to “ball-tamper” with Afghan affairs.

But after clarifications from Khan and Pakistan’s foreign ministry, Mashal will return to Islamabad, Afghan foreign ministry spokesman Sibghatullah Ahmadi said in a tweet.

The Pakistani foreign ministry said on Wednesday Khan’s comments, reported by Pakistani media outlets and picked up in Afghanistan, had been taken out of context.

Kabul has demanded an explanation from Islamabad three times in just over a month for comments related to peace talks aimed at ending 17 years of war in Afghanistan.

U.S. and Taliban officials have held several rounds of talks but the Taliban have refused to talk directly to the Afghan government, which they consider an illegitimate “puppet” regime.

Afghan President Ashraf Ghani’s mandate officially expires in May and he faces a re-election battle. But the date for the vote has been postponed twice and is now set for Sept. 28.

Ghani has been shut out from the peace talks and is under pressure from rivals to step aside and allow a caretaker government to take over, a suggestion he has rejected.