WASHINGTON (Reuters) - U.S. President Donald Trump has asked for Pakistan’s help with faltering Afghan peace talks in a letter to new Prime Minister Imran Khan in which he made clear that Islamabad’s assistance was “fundamental” to the health of the two countries’ strained relationship, a senior Trump administration official said.

Pakistan's Prime Minister Imran Khan gestures as he speaks during the groundbreaking ceremony of the Kartarpur border corridor, which will officially open next year, in Pakistan November 28, 2018. REUTERS/Mohsin Raza

The U.S. president wants to end the 17-year-old conflict between Afghan security forces and the Taliban, who are fighting to drive out international forces and reestablish their version of strict Islamic law after their 2001 ouster.

The administration official, who did not want to be identified, said on Monday that Trump requested “Pakistan’s full support” for the U.S. effort to advance the Afghan peace process and for U.S. Special Representative Zalmay Khalilzad’s trip to the region.

Trump also said in the letter to Khan that he “recognizes that Pakistan has the ability to deny the Taliban sanctuary on its territory,” the official said.”The letter also makes clear that Pakistan’s assistance with the Afghan peace process is fundamental to building an enduring U.S.-Pakistan partnership,” the official said.

The Pakistani foreign ministry had a different take on the letter, saying Trump asked for its “support and facilitation” in negotiating an end to the war, and offered to renew bilateral ties.

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 long been pushing Pakistan to lean on Taliban leaders, who Washington says are based inside Pakistan, to bring them to the negotiating table. Pakistani officials deny offering safe havens to the Afghan Taliban and say their influence on the group has waned over the years.

Trump appointed Afghan-born U.S. diplomat Khalilzad as special envoy tasked with pushing through peace talks.

Khalilzad said last month he hoped a deal would be reached by April 2019.

But Afghan Taliban militants said they had not accepted any deadline and said a three-day meeting in Qatar between their leaders and Khalilzad ended with no agreement.

Khalilzad on Sunday began an eight-country tour, including Pakistan, Russia and Qatar, to promote peace and convince the Taliban to join negotiations.

U.S. Defense Secretary Jim Mattis said on Monday that the war in Afghanistan had gone on for long enough.

“We are looking for every responsible nation to support peace in the subcontinent and across this war in Afghanistan,” Mattis told reporters. “It is time for everyone to get on board.”

Trump has been clear that he wants to bring home U.S. troops who remain in Afghanistan as part of Resolute Support and a separate counter-terrorism mission aimed against militant groups such as al Qaeda and Islamic State.

“President Trump has also acknowledged that the war had cost both USA and Pakistan. He has emphasized that Pakistan and USA should explore opportunities to work together and renew partnership,” Pakistan’s foreign ministry said in a statement.

It added that Pakistan was committed to playing “a facilitation role in good faith”.

Last month, Trump said Pakistan doesn’t “do a damn thing” for the United States despite billions of dollars in U.S. aid.

He defended cutting aid to Islamabad and also suggested Pakistani authorities knew Osama bin Laden’s location prior to his killing by U.S. troops in a raid inside Pakistan in 2011.

Khan hit back by saying the United States should not blame Pakistan for its failings in Afghanistan.

Last week, Afghan President Ashraf Ghani said he had formed a 12-strong team to negotiate peace with the Taliban but implementation of any deal would take at least five years.