Pakistani Prime Minister Imran Khan is holding his first face-to-face talks with US President Donald Trump during a trip to Washington DC.
The meeting is part of a push to mend relations, which have been strained by the Afghan conflict.Trump reduced security aid to Pakistan early last year, accusing the country of "lies and deceit".
At the White House meeting on Monday, Trump also offered to mediate the Indian-Pakistani conflict in Kashmir.
He said that he was making the offer after Indian Prime Minister Narendra Modi requested that he "mediate or arbitrate" the 70-year old territory dispute between the two nat ions.
"If I can help, I would love to be a mediator," Trump said on Monday.
"If I can do anything on that let me know."
What else did the leaders say?Trump said that Pakistan was helping the US to "extricate" its troops from Afghanistan, through political negotiations.
The US president said he could win the war in Afghanistan within 10 days, but that he did not want to kill millions of people. He is aiming to persuade Khan to pressure the Taliban into striking a peace deal with the Afghan government.
Khan praised the negotiations, saying: "There is no military solution in Afghanistan. If you go all out military, millions and millions of people will die."
Trump added that before Khan came into office, the country had been "subversive" to US interests and "did not respect US leadership".
What are the diplomatic tensions?
Since he won Pakistan's general election just under a year ago, Khan has called for "mutually beneficial" ties with America, while remaining an outspoken critic of US anti-terrorist tactics such as drone strikes.
The Trump administration is trying to negotiate its military withdrawal from Afghanistan with the Taliban, a militant group it has long accused Pakistan of supporting.
Khan has previously said that US assistance was "minuscule" compared with what the US-led "war on terror" had cost Pakistan.
As well as counter-terrorism and defence, the two leaders are likely to be discussing trade and investment as Khan battles to fend off a balance of payments crisis after a bailout from the International Monetary Fund.
How did relations fray last year?
Since Donald Trump took office in 2017, his administration has adopted a hard line against Pakistan, accusing it of supporting Islamist militants and misleading the US over the issue - charges Islamabad denies.
Trump began 2018 by promising on Twitter to end "foolish" aid to the country.
As much as $2bn (£1.6bn) in US security assistance has been suspended.
After Trump tweeted again in November to remind Pakistan that 9/11 mastermind Osama Bin Laden had lived there before finally being hunted down by US forces, Imran Khan shot back to "put the record straight" on which country had paid more to defeat terrorism.
However, a couple of months before that Twitter clash, US Secretary of State Mike Pompeo had already raised the prospect of a reset with the new government of Khan.
According to Pakistan's foreign office, Khan's visit "will help renew and reinvigorate long-standing ties between Pakistan" and the US.
Adding to the positive mood music came a new tweet from Trump on Wednesday, announcing that Pakistan had arrested the "mastermind" of the 2008 terror attacks in the Indian city of Mumbai, after a search lasting two years.
Pakistani authorities over the past two decades. Far from hiding, he has even addressed rallies and campaigned in recent Pakistani elections.
Pakistan will hope the arrest will help persuade the Financial Action Task Force (FATF), a global watchdog against money laundering and terrorism financing, not to blacklist it in the coming months.
How crucial is Afghanistan to the relationship?
Writing in Foreign Policy, Sherry Rehman, Pakistan's ambassador to the US between 2011 and 2013, argues that "stabilizing Afghanistan is Pakistan's only real trump card" in its dealings with the US.
Pakistan has always denied it was the architect of the Taliban. It was one of only three countries to recognise them after they took power in Afghanistan in 1996 and the last to break diplomatic ties when US-led forces ousted the movement after the 9/11 attacks in 2001.
Few observers doubt that Pakistan has been instrumental in getting the Taliban to the table for direct talks with members of the Afghan government this month, a negotiation praised by US lead negotiator Zalmay Khalilzad as a "big success".
The Trump administration is keen to end a war which, according to US officials, costs about $45bn annually, and to withdraw most or all of the 14,000 American soldiers deployed there.
In the opinion of Rehman, Pakistan has already "received some muted recognition of its unprecedented efforts to facilitate these delicate negotiations" in two respects this month:
- The US listed the Balochistan Liberation Army, a separatist group active in Pakistan, as a terrorist group
- The IMF approved a $6bn loan package for Pakistan
"Pakistan has been facilitating the US-Taliban talks in good faith, underscoring that it remains a shared responsibility," Foreign Minister Shah Mehmood Qureshi said recently.
"It will therefore be appropriate to work for broader engagement from Afghanistan to bilateral issues, economic and trade co-operation, to peace and stability in South Asia."
What are Khan's economic aims?
The US, a major source of foreign investment in Pakistan, remains its largest export market, so trade is very much on the agenda in Washington.
However, financial pressures have led Pakistan to go further afield in search of aid and it attracted Saudi pledges of investment deals worth $20bn this year.
Given that Pakistan is so strapped for cash, Khan has been keen to portray an image of austerity. He used to be known as a celebrity playboy but now styles himself as a pious, anti-poverty reformer.
Before he left for the US, reports said he planned to stay at the Pakistan ambassador's residence in Washington, rather than waste money in an expensive hotel.
Pakistan has also been seeking new assistance from China, its biggest foreign investor and also a major aid donor.
So Imran Khan must tread a delicate path between Trump's America and its economic arch-rival, Beijing.