ISLAMABAD (Reuters) - Pakistani Prime Minister Imran Khan met with a U.S. peace envoy on Wednesday and pledged his help to find a political settlement to the long-running war in neighboring Afghanistan.

FILE PHOTO: Cricket star-turned-politician Imran Khan, chairman of Pakistan Tehreek-e-Insaf (PTI), speaks after voting in the general election in Islamabad, July 25, 2018. REUTERS/Athit Perawongmetha/File Photo

The visit to Islamabad by Zalmay Khalilzad, U.S. special representative to Afghanistan, followed President Donald Trump’s request for Pakistan’s help in finding an end to the 17-year-old war between Taliban insurgents and the western-backed Afghan government.

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

“The prime minister reiterated Pakistan’s abiding interest in achieving peace and reconciliation in Afghanistan through political settlement,” Khan’s office said in a statement.

Trump’s overture to Khan followed an exchange of barbed tweets between the leaders last month.

Officially allies in fighting terrorism, Pakistan and the United States have a complicated relationship, bound by Washington’s dependence on Pakistan to supply its troops in Afghanistan, where the United States still has 14,000 troops, but plagued by accusations Islamabad is playing a double game.

U.S. officials have for years been pushing Pakistan to lean on Taliban leaders, who Washington says are based inside Pakistan, to bring them to the negotiating table.

The U.S. and Afghanistan have long accused Pakistan of covertly sheltering Taliban, which Islamabad denies.

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.

The Pakistani statement quoted Khalilzad as saying that the U.S. leadership looked forward to working with Pakistan in furthering the shared goal of peace.