In this photo released by Press Information Department, visiting U.S. Secretary of State Mike Pompeo, left, shakes hand with Pakistan's foreign minister Shah Mahmood Qureshi, prior to their Wednesday meeting in Islamabad, Pakistan. Pompeo arrived in Pakistan on Wednesday at a time when relations between the two countries have sunk to a new low. Credit: Press Information Department via AP

ISLAMABAD — Pakistan’s newly-elected Prime Minister Imran Khan met with U.S. Secretary of State Mike Pompeo in Islamabad on Wednesday, saying he was “optimistic” he could reset the relationship with Washington after the U.S. suspended aid over the country’s alleged failure to combat militants.

“You know I’m a born optimist,” said Khan, a former star cricket player who was sworn in last month. “A sportsman always is an optimist. He steps on the field and he thinks he’s going to win.”

Pompeo spent just four hours in Pakistan, his first visit to the country. At the airport before leaving for neighboring India, he said he was “hopeful” that a foundation had been laid to move forward.

“We’ve still got a long way to go, lots more discussion to be had,” he said. “It’s time for us to begin to deliver on our joint commitment … We’ve had lots of times where we’ve talked and made agreements, but we haven’t been able to actually execute those.”

Pompeo held meetings with Khan, Pakistan’s Foreign Minister Shah Mahmood Qureshi and the powerful Army Chief Gen. Qamar Javed Bajwa.

“We talked about their new government, the opportunity to reset the relationship between our two countries across a broad spectrum, economic, business, commercial,” Pompeo said.

He said they also discussed “the work that we all know that we need to do to try to develop a peaceful resolution in Afghanistan that benefits certainly Afghanistan, but also the United States and Pakistan.”

“I’m hopeful that the foundation that we laid today will set the conditions for continued success as we start to move forward,” he said on the tarmac before leaving.

The United States last weekend canceled a $300 million Coalition Support Fund payment to Pakistan after long complaining that it was not doing enough to combat the Taliban and other militants who attack Afghan and U.S. forces across the porous border.

Pakistan has rejected those allegations, saying it has played a key role in the U.S.-led campaign against extremists that began after the 9/11 attacks.

“In all of his meetings, Secretary Pompeo emphasized the important role Pakistan could play in bringing about a negotiated peace in Afghanistan, and conveyed the need for Pakistan to take sustained and decisive measures against terrorists and militants threatening regional peace and stability,” the U.S. Embassy in Islamabad said in a statement issued after Pompeo’s departure.

On the plane to Pakistan, Pompeo announced his appointment of Zalmay Khalilzad, a veteran diplomat who is unpopular in Pakistan, as the new U.S. special adviser on Afghan reconciliation, which could further complicate relations with Islamabad.

Khalilzad “has been very critical of Pakistan in the past and his appointment will not help move things forward,” said Zahid Hussain, a defense analyst and the author of two books on militancy in the region.

Khalilzad was born in Afghanistan and served as U.S. special envoy to the country following the collapse of the Taliban from 2001-2003 and then as U.S. ambassador to Afghanistan from 2003-2005.

He has been critical of Pakistan, often blaming Afghanistan’s deteriorating security and country-wide chaos on Pakistan’s military and powerful ISI intelligence agency, accusing them of harboring and aiding Taliban insurgents.

Khalilzad has been criticized for his role in cobbling together an Afghan government of warlords following the Taliban’s collapse. Afghanistan’s corruption-plagued government and, by some accounts, poorly trained security forces, have frustrated Afghans and contributed to the country’s deteriorating security situation.

Neither the U.S. nor Pakistan can afford a complete rupture in relations, but Hussain said Islamabad is frustrated that the relationship has been reduced to a single issue: Afghanistan.

“The United States seems only to see Pakistan through the prism of Afghanistan,” he said. “The main thing is we would like to be allies with the U.S. but with dignity.”

As an opposition leader, Khan often chastised Pakistan’s reliance on U.S. financial assistance. He and his supporters once briefly stopped trucks supplying fuel and other goods to U.S. and NATO troops from crossing into Afghanistan to protest U.S. drone strikes in Pakistan’s tribal regions along the border.

In a speech following the July 25 elections that propelled him to power, Khan said Pakistan would not participate in the U.S. war on terror, instead advocating a peaceful end to the protracted war in Afghanistan.

Qureshi, Pakistan’s foreign minister, told a news conference held after Pompeo’s departure that the United States indicated there was an opportunity for direct talks with the Taliban, a demand the insurgent movement has consistently made.

Khan has flatly rejected a U.S. strategy that advocates a heavy military hand to force Afghanistan’s Taliban to the negotiating table.

Pompeo arrived shortly before 8 p.m. local time in the Indian capital of New Delhi.

Associated Press writer Munir Ahmed contributed to this report.

Follow the Bangor Daily News on Facebook for the latest Maine news.