Landale online: Cameron builds bridges in Pakistan
In July last year, David Cameron, while travelling in India, said this: "We want to see a strong, stable and democratic Pakistan.
"But we cannot tolerate in any sense the idea that this country is allowed to look both ways and is able, in any way, to promote the export of terror whether to India, whether to Afghanistan or anywhere else in the world."
The resulting outrage in Islamabad still lingers.
One local journalist told the prime minister to his face today that these remarks were obnoxious.
So today Mr Cameron came to build bridges over some rather troubled waters.
"Let's clear up the misunderstandings of the past, work through the tensions of the present and look together to the opportunities of the future," he said.
The message was that Pakistan's security services - the ISI - have changed, as have the circumstances.
Such is the scale of the terrorist threat from militants of all colours in Pakistan that - so the argument goes - the ISI are too busy tackling the Taliban here to worry about staying in touch with their counterparts over the border in Afghanistan.
But the prime minister did come to forge a new security relationship with a country that is still the source of many terrorist threats to the UK.
There were no businessmen selling arms on this trip, instead the chief of defence staff and the head of the security service MI6.
The aim is to establish a broader, steadier security relationship with Pakistan, a relationship that some British officials said in the past was too transactional and, on occasion, dysfunctional.
So there will be more regular meetings of officials and politicians, and hopefully less chance for misunderstanding.
The problem is this: Mr Cameron came promising lots of relationship-repairing goodies like education aid worth £650m and greater co-operation over roadside bombs.
But it is still not clear yet what Britain is getting in return.