One reason why there are so many bizarre conspiracy theories in Pakistan is that there are so many conspiracies, as the past few weeks have amply demonstrated.
Many focus on the role of the country's principal spy network, the Inter-Services Intelligence (ISI). Some liberal journalists believe that it exercises a decisive influence over Pakistan's media and politics and even secretly backs the Pakistani Taliban, whose rebellion has cost the lives of more than 3,500 soldiers and police - including 80 officers of the ISI.
These beliefs are often grossly exaggerated, but then again, what we do know of the ISI's activities is enough to give us pause. I find it entirely plausible that, from somewhere inside the ISI's headquarters in Islamabad - whose gleaming grandeur dwarfs any government office I have seen - the service was helping to shelter Osama Bin Laden. To believe otherwise, one would have to think that it was guilty of gross negligence.
The ISI was established by a British army officer of Australian extraction, Major General William Cawthorne, during that curious period after independence when, even after Pakistan and India had in effect gone to war over Kashmir, Britain continued to provide many of the senior officers of the Pakistani military.
The ISI was set up to gather and co-ordinate military intelligence, supplanting Military Intelligence (MI), which had performed poorly in the first conflict with India and had been relegated largely to combating subversion and mutiny in the armed forces. MI, an organisation so secretive that itmakes the ISI look like a bunch of blabbermouths, continues to do this with what seems to be considerable success. But one thing is certain about MI: while it can monitor the regular armed forces, it is not allowed to supervise the ISI. Pakistan's third intelligence service is the civilian Intelligence Bureau (IB), which comes under the ministry of the interior. The ISI regards it, in the words of one officer, as "no better than policemen. And you know what our police are like."
The underfunded and poorly staffed IB loathes the ISI and some of the most vicious stories I have heard about the ISI's involvement in terrorism come from the IB. Needless to say, the lack of co-ordination between the three services has often been the despair of western counterterrorism officers.
The ISI's growth from a British-model intelligence organisation to a "state within a state" was the result of three processes. The first was the conflict with India, which, in one form or another, has been dragging on since both countries gained independence. This conflict and the acute paranoia it has created have profoundly shaped the Pakistani state and the ethos of its military.
The second was fear of internal revolt in Pakistan, which led the state to give the ISI a vital role in domestic intelligence. In 1989-90, the ISI used this power in Operation Midnight Jackal, a plot to undermine parliamentary support for Benazir Bhutto, which helped to bring down her government. It also wields much influence within the bureaucracy because it is in charge of giving security clearance to senior officials. A negative assessment will ruin a career.
The third factor was the anti-Soviet war in Afghanistan. General Zia-ul-Haq used the ISI to channel US and Arab aid to the Afghan mujahedin. A good deal of this money stuck to the ISI's fingers, giving it secret sources of funding independent of the Pakistani military, let alone the state.
The war also got the ISI involved in Afghan politics and allied it intimately with groups in the mujahedin, especially Islamists among the Pashtuns, such as Gulbuddin Hekmatyar's Hezb-e-Islami, which remains an ally of Pakistan today. More importantly, it forged close links with the Pakistani and Arab militant groups that went to fight in Afghanistan.
These groups have since inflicted much damage on the west - and on Pakistan - but the ISI retains a quasi-parental affection for at least some of them. Its thinking wrongly goes that the Soviet withdrawal from Afghanistan and the fall of the Kabul government was a great Pakistani victory. It has convinced itself that it was the architect of this victory and that what it did to the Soviets in Afghanistan, it could also do to the hated India.
Fatefully, when the revolt against India broke out in Kashmir in 1989 (initially as a spontaneous protest against Indian misrule), the state and military charged the ISI with the task of directing help to the Kashmiri rebels. It did this by supporting the Pakistani militant groups that it had backed in Afghanistan as they carried out guerrilla and terrorist attacks against Indian targets. These later spread more widely and became more indiscriminate.
Under intense US and Indian pressure, President Pervez Musharraf scaled back Pakistan's assistance to such groups after the terrorist attack on the Indian parliament in December 2001. It did not end entirely, however. After the Mumbai attacks of 2008 by the Pakistani group Lashkar-e-Toiba (LeT), both the surviving attacker and the Pakistani-American LeT conspirator David Headley reported that the group had been helped in its planning by the ISI. It is still not known at what level of the intelligence service that decision was made.
So, where does this history leave the ISI today, especially in the context of the Bin Laden affair? It goes without saying that the ISI is not under any sort of control by the Pakistani government. When I was asked on US television recently how President Asif Ali Zardari could not have known what his intelligence service might have been up to, I let out a hoot of incredulous laughter. The interviewer had clearly not been following Pakistan very closely. Contempt for civilian politicians and ministers is strong in the military and stronger still among the retired ISI officers to whom I have spoken - in part because they know so much about these politicians' corruption, murders, sexual behaviour and family lives.
A much more difficult question is whether the ISI is even under the full control of the Pakistani military or whether it, and groups within it, are following their own agenda. This is of crucial importance in relation to Bin Laden's death and Pakistan-based terrorism more generally; for not only does it raise the possibility of the ISI's complicity in terrorism against the west (as opposed to the Taliban revolt in Afghanistan), it suggests the possibility of Islamist subversion within the Pakistani military. That points towards the threat of mutiny within the army, the collapse of the state and loss of control over Pakistan's nuclear stockpiles. This possibility still seems pretty remote to me unless Washington were to attack Pakistan directly (for example, following a terrorist attack on the US).
By the nature of their work, their secrecy, their extremely compartmentalised organisation and their professionally fostered paranoia, secret services generate conspiratorial groups with separate and sometimes wild agendas. Nonetheless, the high command of the ISI is part of the high command of the military. The present army chief of staff, Ashfaq Kayani, was formerly head of the ISI under Musharraf. Formidably intelligent and self-disciplined, General Kayani is very much a Pakistani officer of the post-Zia era. His rise demonstrates the meritocracy of the military; his father was a non-commissioned officer.
Kayani is known to be a pious Muslim and is conservative in his personal life but has no reputation of sympathy for Islamist politics. Had he been an Islamist, he could not possibly have risen to the top under Musharraf, who was secular in his beliefs and behaviour.
Similarly, the present director of the ISI, Lieutenant General Ahmad Shuja Pasha, is known to be hostile to the militants and was appointed because he had long been close to Kayani; according to rumour, the US also urged Islamabad to appoint him.
Like the commanders, most of the senior and middle-ranking staff of the ISI are not intelligence professionals but regular officers, temporarily seconded. At the top level, therefore, the ISI is part of the military high command and follows its orders.
The ISI does, however, see itself as an elite within the military. As a Pakistani journalist close to the intelligence service told me, "The ISI is the intellectual core and centre of gravity of the army. Without the ISI, the army is just an elephant without eyes and ears." This phrase caused extreme annoyance among some military friends to whom I repeated it.
What mindset has shaped the behaviour of Pakistan's generals, including those of the ISI? By far the most important aspect of a Pakistani senior soldier's identity is that he (or, very occasionally, she) is an officer. The Pakistani military is a profoundly shaping influence. It would be hard to find a more different group of men than the generals Ayub Khan, Yahya Khan, Zia, Mirza Aslam Beg, Asif Nawaz, Jehangir Karamat, Musharraf and Kayani in terms of social origin, character and attitude to religion. Yet all have been first and foremost military men.
This in turn means that their ideology was, or is, rooted primarily in Pakistani Muslim nationalism. As institutions, the military and the ISI are tied to Pakistan, not the universal Muslim caliphate of Islamists' dreams. If it is true, as so many officers have told me, to say that "No army, no Pakistan", it is equally true to say that "No Pakistan, no army".
In the 1980s, Zia-ul-Haq tried to make the army more Islamic and a good many officers who wanted promotion adopted a pious façade. He also encouraged Muslim preaching within the army, notably by the proselytising organisation Tablighi Jamaat. However, as Musharraf's career indicates, this did not lead to generals known to be secular being blocked from promotion; in the 1990s, most of Zia's measures were rolled back.
In recent years, preaching by the Tablighi has been strongly discouraged, not so much because of political fears - the Tablighi is determinedly apolitical - as instinctive opposition to any group that might encourage factions among officers and loyalties to anything other than the army.
Nationalism can be a positive and even indispensable force for the development of a country. Modern Turkey, so often held up to the rest of the world as a model, was founded on an ardent and ruthless nationalism.
The problem is that it may be wrapped up with particular differences and enmities. Pakistan's existential hostility is to India. Just as the US national security state was shaped by the cold war, so the Pakistani national security state (vastly more powerful in its own country) was born chiefly out of fear of, and hostility to, India. This is felt most strongly in the military and, in the ISI, it is a raging monomania.
Asked to describe an average Pakistani officer today, the retired lieutenant general Tanveer Naqvi told me: "He has no doubt in his mind that the adversary is India - and that the raison d'être of the army is to defend [the country] against India. His image of Indians is of an anti-Pakistan, anti-Muslim and treacherous people. So he feels that he must be always ready to fight against India."
The shelter given by the Pakistani military to the Afghan Taliban and its allies is based on a belief that the US is sure to fail in Afghanistan and that civil war will follow the US's withdrawal. In that civil war, India will use its allies to encircle Pakistan strategically.
Thus, Pakistan, too, must have allies - and the only one available is the Taliban. That stands even though senior officers know very well that, in the 1990s, despite all the help Pakistan had given the Taliban, it repeatedly kicked the country in the teeth.
On the whole, Pakistan has given shelter, not support, to the Taliban. But the ISI - perhaps through a notorious, ultra-secret branch, the "S wing" - has given some direct help to its Haqqani network (in its 2008 and 2009 attacks on the Indian embassy in Kabul, for example).
As for LeT and the other anti-Indian militant groups, the Pakistani military and the ISI insist that they must keep them close in order to restrain them from attacking India, as well as making sure that they do not launch or help in terrorist assaults on the west.
As a result, the Pakistani courts have overturned the ban on LeT's public organisation, Jamaat-ud-Dawa, and refused to convict the LeT leader, Hafiz Saeed, on terrorism charges. There is a fear in the Pakistani establishment that a crackdown on LeT of the kind demanded by Delhi and Washington would result in its members joining the revolt of the Pakistani Taliban and that the revolt would spread to Punjab. It would also remove any constraint on LeT from hatching terror plots against the west.
In seeking to deflect western criticism, the ISI points to its helpfulness in the past in capturing al-Qaeda leaders and helping to identify terrorist plots against Britain and the US. Those arrested with ISI participation include two of the most senior figures apart from Bin Laden: Ramzi Bin al-Shibh and Khalid Sheikh Mohammed, both of whom are being held in detention in Guantanamo Bay.
In January, the ISI arrested Umar Patek, a leading Indonesian terrorist linked to al-Qaeda, in Abbottabad. The ISI is now fighting very hard to defeat Islamist rebellion in Pakistan. It has suffered heavy losses in the process, including the death of one of its best-known officers, "Colonel Imam" (Colonel Sultan Amir Tarar), who was captured and eventually executed by the Pakistani Taliban, despite appeals from the Afghan Taliban, to whom he had given much assistance.
All of this is true enough, but doubts remain about the motives and future intentions of the ISI. In 2009, I had a horrifying conversation with the journalist and analyst Zaid Hamid, who had been recommended to me by a senior ISI officer as an interesting person to meet.
Hamid is a self-described Pakistani neoconservative and, like some neocons of my acquaintance in Washington, his favourite word seemed to be "ruthless".
“We say that if India tries to break up Pakistan by supporting insurgents such as the Baloch nationalists, then our response should be to break up India," he told me. "India is not nearly as strong as it looks. The fault lines of the Indian federation are much deeper than those of Pakistan: Kashmir, the Naxalites, Khalistan, Nagaland, all kinds of conflicts between upper and lower castes, tribals, Hindus and other religions, and so on. If we were to support these insurgencies, India would cease to exist."
Kashmir aside, there is no evidence that the ISI is supporting any of these insurgencies within India. But Hamid's apparent closeness to the ISI makes these views deeply alarming - although, to be fair, they are also quite widely shared in Pakistani society and attract a mass audience to his television programme.
If Hamid's views are representative of elements within the ISI, we must conclude that the service remains determined to strike India again at some point in future, using Islamist militants. And given that the US is increasingly seen in Pakistan as an ally of India, there is a good chance that Americans will be among the victims of any attack on high-profile targets in India. That is what happened in 2008 in Mumbai, when the gunmen searched for those with US and British passports.
And yet, although some ISI officers undoubtedly feel the deep hostility to the United States that characterises Pakistani society as a whole,
I doubt that those in the more senior ranks would cause the destruction of their country by sponsoring terrorism against the US.
Which brings us back to Bin Laden. It is quite possible to imagine lower-level ISI officers sheltering Bin Laden out of ideological sympathy. If, on the other hand, a decision to do so was made higher up the military chain of command, then the motivation would have been different: to preserve him as a bargaining chip to surrender to the US later, in exchange for concessions. That would be a more comforting scenario.
One thing is clear: the ISI should be brought under much greater state control. This will require a détente between India and Pakistan that would reduce the anti-Indian paranoia in Pakistani society which gives the military and the ISI their legitimacy. But this is not going to happen any time soon and, in the meantime, we are doomed to try to co-operate with the ISI - without trusting it an inch.
Anatol Lieven is professor of war studies at King's College London. His most recent book, "Pakistan: a Hard Country", is newly published by Allen Lane (£30). Samira Shackle reviews the book in this week's New Statesman.