Here — in alphabetical order — are six countries that have considerable involvement in Pakistan: Afghanistan, India, Saudi Arabia, the United Arab Emirates, the United Kingdom and the United States. I once asked a senior Pakistani military officer to consider how the army perceives the threat each of these countries pose to Pakistan and then to rank them with the most threatening first. 
You will probably not be surprised to learn that he came up with India, the United States, Afghanistan, and then, after a bit of thought, the UK, Saudi Arabia and the UAE. Let us consider each country in turn. Since 1947, an element of Indian society has believed Pakistan should not exist. In 1971 India made a big contribution to the loss of the then East Pakistan. 
India shells Pakistan positions in Siachen and occupies disputed territory in Kashmir. There is good reason to believe India&’s RAW has over the years organised bomb attacks in Pakistan. According to numerous interrogations of MQM suspects who spoke with the confidence that comes with impunity, India has trained MQM fighters. Many believe it has also put money into the Baloch insurgency. Pakistan can hardly consider itself to be the sole victim in all of this. 
Pakistan shells Indian positions in Siachen and also holds disputed Kashmiri territory. There is good reason to believe the ISI has planted bombs in India and a group with close links to Pakistan&’s security establishment, the Lashkar-e-Taiba, has mounted attacks in India, including that on Mumbai. But the point here is not to argue about which side is justified — it is rather to assess the level of threat India poses to Pakistan compared to the five other countries on the list. 
So, what of the United States? Looking back, the US helped the ISI create and train ‘jihadi’ forces that now threaten Pakistan. More recently Washington has directly attacked Pakistan. There have been hundreds of drone strikes. But some of these drone strikes were requested by Pakistan which, for many years, even provided an air base to facilitate the American activity. It is also worth noting that since 9/11 the US has given over $25 billion to Pakistan. 
Most of it has gone to the army. Next up, Afghanistan. It acts as a safe haven for fighters who want to attack targets in Pakistan (just as Pakistan has provided a safe haven for fighters who want to attack targets in Afghanistan). But the main threat posed by Afghanistan is long term. Successive Afghan governments have rejected the validity of the Durand Line but have been too weak to advance their claim. Should a strong Pakhtun-led government ever be established in Kabul, Pakistan should expect a challenge to its territorial integrity. 
During the 1980s, the Saudis matched US spending on creating anti-Soviet ‘jihadis’. And Pakistan still suffers from the political dispensation under which the House of Saud enjoys clerics’ support so long as they are free to export their brand of Islam. It is widely accepted that Saudi Arabia has poured vast sums of money into Pakistani madressahs that have produced some of the fighters who have killed tens of thousands of people. 
Riyadh&’s reluctance to accept Shia officers amongst the ranks of Pakistani army personnel deployed to Saudi Arabia undermines the tradition of harmonious inter-communal relations within the Pakistan army. On the other hand, Saudi Arabia has for years provided Pakistan with cheap oil. You could argue that neither the UK nor the UAE are powerful enough to merit inclusion on the list. 
Yet, both have played quite important, negative and enabling roles by providing a place of exile for corrupt politicians and coup leaders. The UK also provides a safe haven for the political leadership of MQM, despite knowing that the organisation is involved in considerable levels of violence in Karachi. On the other hand the UK is spending quite considerable sums on education, especially in Punjab. 
So is the military officer&’s ranking of the relative threat posed by these countries correct? It is a difficult assessment. Should US aid and Saudi oil, for example, offset some of the harmful actions by those two countries? And are long-term threats more or less important than short-term ones? One way of looking at it is to try to assess the number of Pakistanis whose violent deaths can be traced back to the countries on the list.
One might compare, for example, the number of people being killed by US drones (bearing in mind that Pakistan facilitated most of them) with the numbers being killed by Saudi-funded Afghanistan-based militants. It is complicated because some of the sources of violence overlap in not very holy alliances. 
Still, a consideration of who the Pakistani victims might reasonably blame could result in the following ranking of threats: Afghanistan, Saudi Arabia, the US, India, the UK and the UAE. 
The writer is a British journalist and author of Pakistan: Eye of the Storm.