Pakistan’s foreign office reportedly discussed calling off the visit – which has not yet been officially announced and should follow a trip to Paris – but the president apparently insisted that it go ahead.
Pakistan has protested about Cameron’s remarks – but not too much. There is really little point in Islamabad denying that its spy agency, the Inter-Services Intelligence (ISI), helped launch the Taliban in Afghanistan and that the relationship has been an enduring one.
This week’s revelations by the WikiLeaks website brought to light more allegations of Pakistani involvement with the Taliban and similar groups, although they were of varying degrees of reliability.
And there is plenty of evidence that the ISI has trained other Islamist groups to operate in Indian-adminstered Kashmir, the Muslim-majority state which Pakistan believes should be under its control.
But Cameron’s decision to tell Islamabad that it cannot “look both ways” in the Afghan war must annoy Pakistanis on more than one count.
For a start, countries rarely appreciate lessons on good governance from former colonisers.
And then the use of the term “terrorism” is always problematic (RFI’s styleguide advises journalists to avoid its use whenever possible).
Were the Taliban’s predecessors terrorists when you and your allies helped us arm them to fight the Soviet occupation? Pakistanis like former ISI chief Hamid Gul are prone to ask.
And what about when they destabilised the left-wing government before the Soviets invaded, as President Jimmy Carter’s National Security Adviser Zbigniew Brzezinski has admitted was the case?
And what about Jundullah, the Iranian Sunni-Muslim group which has bombed mosques and killed Iranian revolutionary guards? Tehran claims it is backed by the US, Pakistan and Saudi Arabia, and the US’s ABC news has found US sources who say that is true.
But what must really stick in the Pakistani craw is the fact that Cameron made his remarks in Delhi.
India continually accuses the Pakistanis of either tolerating or backing armed Islamist groups to launch attacks on its territory, including the traumatic events in Mumbai in 2008. Privately Pakistani officials have recently charged that Delhi reciprocates in kind.
Now, as author William Dalrymple points out, India and Pakistan are now involved in a bitter struggle for influence in Afghanistan.
Indian businesses are investing, Indian advisers are visiting and Kabul’s several Indian-owned hotels have many of their compatriots as paying guests.
So Cameron, no doubt inspired by the prospect of selling nuclear know-how and 57 Hawk jets plus engines to India, was taking sides in an escalating dispute.
It is no coincidence that some of those hotels and Indian projects have been attacked, as was the Indian embassy in 2008.
Pakistani writer Tariq Ali is one of many commentators who believe that the ISI has kept its contacts with the Taliban and that it is not acting alone but, he says, the Indian embassy attack was the work of rogue elements who were immediately purged.
Ali argues that Washington needs the Pakistanis as intermediaries for talks with the Taliban, an essential part of President Barack Obama’s plan to pull out in 2011. Karzai was also reported to have lost faith in the US-led offensive and sought rapprochement with Pakistan in order to talk to the Taliban.
Judging by Karzai’s response to the WikiLeaks logs, that process is on hold.
And who would the US or Karzai talk to, anyway?
The Taliban have interpreted the offer to talk as a sign of weakness. So why negotiate if they think they are winning?
Are there moderate Taliban, as Karzai and US Secretary of State Hillary Clinton have indicated in the past? Those fighters least committed to a hard-line Islamist agenda must surely be the later recruits, who have joined to fight foreign troops. They are also the most committed to the Taliban's condition that foreign troops leave before any talks take place.
If Washington's only condition is a promise not to harbour Al-Qaeda, it must find interlocutors who are ready to drop Pashtun traditions of hospitality and Islamic solidarity for the sake of seats in a Karzai-led coalition.
Even if it does, how will it ensure that the interested parties keep their word once US and other Nato forces have left the country?
The US - and the UK's - Afghan problem seems far from a solution.
Pakistan-India - what they don't agree on
Pakistan and India have fought three wars since partition in the wake of the British Raj in 1947. Relations are plagued by disputes over the border, resources and accusations of support for cross-border terror attacks.
Here are some of the main points of contention:
- Kashmir – The Muslim-majority state has been divided since partition, with India controlling most of it; Pakistan claims the whole state and is accused of training Islamist guerrillas to fight Indian rule; in addition to various armed groups, several political parties oppose Delhi's rule and organise frequent protests and strikes; some want to join Pakistan, others want independence.
- Cross-border violence – India accuses Pakistan’s secret services of being behind many bombings and other attacks on its soil; it says Islamabad has failed to crack down on Lashkar-e-Taiba, which it blames for the Mumbai attacks; a senior civil servant claims a confession by a US-born Islamist shows that Pakistan’s secret services, the ISI, masterminded the 2008 slaughter.
- Afghanistan – Pakistan regards Afghanistan as its back yard, and the ISI helped train both anti-Soviet fighters and the Taliban; India has increased its investment and influence since the 2001 US-led invasion, leading to Pakistan fearing that it will be encircled.
- Water – Farmers in the Pakisani breadbasket province of Punjab accuse India of reducing the Chenab river to a trickle; Pakistan claims that a power project in Kashmir violates the 1960 Indus Water Treaty.