ISLAMABAD, Pakistan - Weeks after engaging in a heated war of words with Pakistan's new Prime Minister Imran Khan, that future soured ties between the two nations, now the U.S. President Donald Trump is said to have sought help from the country.

According to Pakistan's Foreign Ministry, Trump has addressed a letter to PM Khan, seeking the country's help with the faltering Afghanistan peace talks.

Trump is reportedly seeking Pakistan's "support and facilitation" in negotiating an end to what has become one of America's longest wars.

Pakistan's Information Minister Fawad Chaudhry said that Trump wrote, He has asked for Pakistans cooperation to bring the Taliban into talks.

In the letter, the U.S. President is said to have offered to renew the strained relationship between the two countries, an overture that is in stark contrast to Trump's normally harsh rhetoric towards Pakistan.

According to Chaudhry, Trump told Khan the Pakistan relationship was very important to the U.S. and sought his help in finding a solution to the Afghanistan conflict.

Meanwhile, the country's foreign ministry added, "President Trump has also acknowledged that the war had cost both the U.S. and Pakistan. He has emphasized that Pakistan and U.S. should explore opportunities to work together and renew partnership."

It added that Pakistan is committed to playing "a facilitation role in good faith."

He said, "Peace and stability in Afghanistan remain a shared responsibility."

U.S. war effort to end?

Faced with several domestic and international defeats, Trump is intent on resolving the 17-year-old conflict between Afghanistan's Security Forces and the deadly insurgent group Taliban.

Limited NATO forces from various countries, along with a large number of U.S. troops continue to battle insurgents in Afghanistan, where violent attacks have increased dramatically this year.

Yet, the U.S. continues to pursue peace talks with Taliban, which have been deadlocked for months since the insurgent group is adamant on its demand of driving out international forces from the country.

Following its 2001 ouster, Taliban has been waging a violent war, in a bid to topple the Western-backed government in Kabul and re-establish its version of strict Islamic law in the country.

The Afghan-born U.S. diplomat Zalmay Khalilzad has been appointed by Trump as a special envoy for Afghanistan to lead peace talks with the insurgent group.

Last month, Khalilzad set a deadline of April 2019 for the war to end, a move that left the insurgent group miffed right before scheduled peace talks in Doha.

Following the talks, Afghan Taliban militants rejected the proposed deadline and said a three-day meeting in Qatar between their leaders and Khalilzad, to pave the way for peace talks, ended with no agreement.

While U.S. officials have been pushing Pakistan to help deal with Taliban leaders and draw them to the negotiating table, Pakistan has sought economic help.

The U.S. has long claimed that Taliban leaders are based inside Pakistan.

Simultaneously, Trump's sudden change of tone in dealing with Pakistan, has further raised speculation that the U.S. is planning to pull out of Afghanistan in the near future.

Previously, Trump has expressed willingness to bring home about 14,000 U.S. troops who are in Afghanistan as part of the NATO Resolute Support.

Additional U.S. troops are also involved in a separate counter-terrorism mission, that is aimed at militant groups such as al Qaeda and Islamic State.