FILE PHOTO: Afghanistan's President Ashraf Ghani (L) delivers a speech next to his wife, Rula Ghani during the United Nations Conference on Afghanistan on November 28, 2018 at the UN Offices in Geneva, Switzerland. Fabrice COFFRINI/Pool via REUTERS

ISLAMABAD (Reuters) - U.S. special envoy Zalmay Khalilzad and the top NATO commander in Afghanistan met Pakistani officials on Thursday as they pursued diplomatic efforts to push forward talks with the Afghan Taliban.

Khalilzad, who has been leading efforts to broker an agreement with the Taliban, met the chief of the Pakistan army staff Gen. Qamar Javed Bajwa along with Gen. Scott Miller, commander of the Resolute Support mission in Afghanistan, and Lisa Curtis, senior director for South and Central Asia at the U.S. National Security Council.

Afghanistan’s frequently hostile relations with Pakistan, which it has regularly accused of supporting the Taliban, have warmed somewhat as regional countries have joined the effort to push the insurgents to open talks with Kabul.

On Thursday, Afghan President Ashraf Ghani called Pakistani Prime Minister Imran Khan and “expressed his gratitude for Pakistan’s sincere facilitation of these efforts”, according to a statement from the Pakistan government spokesman’s office.

The two leaders also issued invitations to visit their respective countries and agreed “to remain engaged and create an environment for resolving all outstanding issues”, it said.

Pakistani officials deny supporting the Taliban and say Islamabad is strongly in favor of a settlement that would maintain stability in Afghanistan and prevent a disastrous economic collapse of its neighbor.

Taliban officials said this week that Pakistan was putting pressure on its leaders to accept talks with the Afghan government, detaining a senior leader in the city of Peshawar before releasing him a few days later.

Taliban representatives have met Khalilzad on at least three occasions but have so far refused to talk directly to the internationally recognized Afghan government, which they consider an illegitimate regime put in place by foreign powers.

The date of Khalilzad’s next meeting with Taliban officials remains unclear after the insurgents threatened to stall the process over disagreements about plans to withdraw international forces from Afghanistan.