President Donald Trump voiced optimism on Monday that Pakistani Prime Minister Imran Khan could help broker a political settlement to end the nearly 18-year-old US war in Afghanistan and held out the possibility of restoring aid to Islamabad. "I think Pakistan is going to help us out to extricate ourselves," Trump said, with Khan sitting next to him at the start of a White House meeting. Trump spoke of possibly restoring $1.3 billion in American that he had cut last year, depending upon the results of the meeting, and offered to mediate in the longstanding dispute between Pakistan and India over the Kashmir region. The United States and Pakistan have a complicated relationship. Trump last year complained on Twitter that the Pakistanis "have given us nothing but lies & deceit" and "give safe haven" to militants. "They were really, I think, subversive. They were going against us," Trump said on Monday, adding that the US relationship with Pakistan had improved. Khan told Trump that a peace deal with the Taliban was closer than it had ever been. "We hope that in the coming days we will be able to urge the Taliban to speak to the Afghan government and come to a settlement, a political solution," Khan said in the Oval Office meeting when reporters were present. Trump wants to wrap up US military involvement in Afghanistan and sees Pakistan's cooperation as crucial to any deal to end the war and ensure the country does not become a base for militant groups like Daesh (the so-called IS). Washington wants Islamabad to pressure Afghanistan's Taliban into a permanent ceasefire and participation in talks with the Afghan government. Trump last year slashed millions of dollars of security assistance to Islamabad. Pakistan has denied the accusations. The Pentagon said Pakistan's army chief, General Qamar Javed Bajwa, will meet later on Monday with the top American military officer, chairman of the US Joint Chiefs of Staff General Joseph Dunford. Analysts believe Bajwa will play a key role in behind-the-scenes discussions, with the military looking to persuade Washington to restore aid and cooperation. Authorities in Pakistan last week arrested Hafiz Saeed, the alleged mastermind of a 2008 militant attack on the Indian city of Mumbai who has been designated a terrorist by the United States and the United Nations. More than 160 people were killed in the four-day siege. But Pakistan has not released Shakil Afridi, a jailed doctor believed to have helped the CIA track down former Al-Qaeda leader Osama Bin Laden, whose organization was responsible for the Sept. 11, 2001, attacks on the United States that triggered the American military intervention in Afghanistan the following month. US forces killed Bin Laden in Pakistan in 2011. Trump told reporters he would discuss Afridi's case with Khan as well as other "hostages." Khan told Trump that he had brought him "good news" on two hostages, but did not elaborate on what he meant while reporters were present. — Reuters