At times, the press conference in the White House was surreal. While Imran Khan, Pakistan’s prime minister, looked on, Donald Trump said he could “kill 10 million people” in Afghanistan to “win a war within a week”, but had decided not to. The US president also said he could be the mediator to solve the decades-long Kashmir dispute between Pakistan and India.

Khan glanced at Trump a few times with a look of resignation over his host’s rambling, often irrelevant hyperbole. But, generally, the prime minister said nothing as Trump leapt to answer questions directed at his guest. Khan carefully kept his hands in front of him, all his fingers touching in a sign of steadiness.

For this was his moment, after 11 months in office, to bring Islamabad out of the cold with the Trump administration and US agencies. Khan was claiming his place on the political centre-stage and looking to restore the $300m in aid cancelled by the US military in September 2018, over claims Pakistan wasn’t doing enough to combat militants in the Afghan border region.

Khan’s official visit appeared to go exceptionally well, with warm greetings from key figures including US Secretary of State Mike Pompeo. Trump responded well to Khan’s compliment that he was president of the most powerful nation of the world. And Khan established Pakistan’s key place with regard to Afghanistan, not as the oft-alleged supporter of terrorism, but as the broker of a settlement.

Talking about Taliban

The first interaction between Khan and Trump was a frosty Twitter spat after the US delivered its slap in the face with the aid suspension.

But circumstances changed when Trump wrote a letter to Khan in December 2018 requesting Islamabad’s help to bring the Afghan Taliban to the negotiating table. Pakistani officials have since developed a constructive partnership with the US Special Representative for Afghanistan, Zalmay Khalilzad, as he and the Taliban have held multiple rounds of negotiations in Qatar. Representatives of the Afghan government participated in the latest phase on July 8, pointing to the possibility of a national resolution involving all major parties.

This positive engagement was made possible only by a re-calibration and alignment of the strategic goals of both sides in Afghanistan. For the first time, a US administration has recognised that it cannot effectively stay in Afghanistan indefinitely. Washington now accepts that the eventual resolution of the conflict will only come from a political process that includes the Taliban. The US has accepted the rationale of the Pakistanis – supported by other regional players such as Iran, Russia, and China – that the Taliban must be part of the government.

Trump has played his part with his simple mantra that US troops must be brought home. In his press conference with Khan, he said the US must not be the region’s policeman, looking instead to regional partners to settle conflicts.

That line gives Khan leverage. In return for the declaration that Pakistan will serve as the top cop on the regional block, Islamabad can pursue the restoration of US aid, take the lead in political manoeuvres in Afghanistan and gain a tactical advantage over its neighbour, India.

Khan’s great game

For Pakistan, the icing on the cake was Trump bringing the K-word before the press. When Khan raised Kashmir, Trump not only jumped to claim his mediation prowess but said a similar request had been made by Indian Prime Minister Narendra Modi. Delhi swiftly and sharply denied the claim.

Then there was Khan’s personal victory, as Trump declared Pakistan a great country and its prime minister a great leader. While rebuilding links with US security agencies, Khan also capitalised on the special circumstance of playing politics from the top table by his appeals to Trump’s ego.

Both Republican senator Lindsey Graham, a close friend of Trump’s, and Saudi crown prince Mohammad Bin Salman connected Khan with Trump. Graham, impressed by his first meeting with Khan, speculated that he and Trump had similar personalities and would get along well. Bin Salman built extremely cordial ties with Khan, particularly as he defied the informal diplomatic boycott of the crown prince following condemnation of the 2018 murder of Saudi journalist Jamal Khashoggi. Bin Salman is close to Trump’s son-in-law and Middle East adviser Jared Kushner, which led to Khan’s invitation to visit the White House.

On the domestic front, Khan and his government have been reaping the political dividends of the Trump endorsement. The daily newspaper Dawn ran with the headline: “He Came, He Saw, He Conquered”. Khan’s address to members of the Pakistani-American community also fired up his base of supporters, catching the opposition and government critics by surprise.

Afghanistan now becomes the catalytic issue to test the Pakistani-US rapprochement. Any peace settlement there would strengthen Khan’s persona as a regional builder of peace and security – and even if this is not immediate, Pakistan’s presence at the head of negotiations yields political capital.

Then comes the bigger test of personalities and politics. For now, Pakistan wants to resolve the Afghan conflict in line with its own strategic perspective – and it’s very aware that Trump wants to take US troops home before going into the 2020 US presidential election campaign. On his trip to Washington, Khan also met with the Democratic speaker of the US House of Representatives, Nancy Pelosi – so he’s aware he must play the long game. Nonetheless, Pakistan considers it can get the best deal on a renewed strategic partnership with the US from Trump during his first term, both for regional security and for the economic challenges facing Islamabad.

Scott Lucas is a professor of international politics and Umer Karim is a PhD candidate in the Department of Politics and International Studies at the University of Birmingham.

This article first appeared on The Conversation.