ISLAMABAD (Reuters) - Pakistan assured visiting U.S. special representative Zalmay Khalilzad on Tuesday that it would back a negotiated settlement with the Taliban to end the long war in Afghanistan, after President Donald Trump personally asked for Islamabad’s help.

FILE PHOTO: U.S. special envoy for peace in Afghanistan, Zalmay Khalilzad, talks with local reporters at the U.S. embassy in Kabul, Afghanistan November 18, 2018. U.S embassy/Handout via Reuters

Khalilzad, an Afghan-born veteran U.S. diplomat who served as George W. Bush’s ambassador to Afghanistan, Iraq and the United Nations, was named by the Trump administration three months ago as a special envoy to negotiate peace in Afghanistan.

His visit to Pakistan came a day after Pakistani officials confirmed that Trump had written to Prime Minister Imran Khan seeking assistance in moving peace talks forward. Khan said Pakistan would do whatever possible to help Washington negotiate with the Taliban.

Khalilzad arrived on Tuesday in Islamabad and called on Foreign Minister Shah Mehmood Qureshi, a foreign office statement said. It said the envoy reiterated Trump’s desire to seek Pakistan’s cooperation for peace in Afghanistan.

“The foreign minister assured the U.S. side of Pakistan’s steadfast support for a negotiated settlement,” it said.

In his letter to Khan, Trump offered to renew the strained relationship, Pakistan’s foreign ministry said on Monday. The overture to Khan came after an exchange of barbed tweets between him and Trump last month, and represents a sea change from Trump’s frequently harsh rhetoric toward Pakistan.

It could also add to speculation in the region that the United States is seeking to withdraw from Afghanistan.

The United States, which had more than 100,000 troops in Afghanistan at its peak in former President Barack Obama’s first term, withdrew most of them in 2014 but still keeps around 8,000 there aiding the Afghan security forces and hunting militants.

Trump wants to bring to a close the conflict between Afghan security forces and the Taliban, who were removed from power with the aid of American bombing after the Sept. 11, 2001 attacks on the United States, and have fought ever since to reestablish their version of strict Islamic law.

U.S. officials have long been pushing Pakistan to lean on Taliban leaders, who Washington says are based inside Pakistan, to bring them to the negotiating table. The United States and Afghanistan’s government have long accused Pakistan of covertly sheltering Taliban leaders, which Islamabad vehemently denies.

Khalilzad said last month said he hoped to reach a settlement by April 2019 to end the war. But Afghan Taliban militants last month rejected the proposed target and said a three-day meeting in Qatar between their leaders and Khalilzad, to pave the way for peace talks, had ended with no agreement.

Islamabad has promised in the past to work to help bring the Afghan Taliban to the negotiation table, but this will be the first attempt for Khan’s new government, in power since August.

Khan, who enjoys the support of Pakistan’s powerful army, believes the Afghan Taliban have been motivated to fight by the foreign military presence in Afghanistan, and says a political settlement is the only solution.