It has not been a good year for Pakistan. President Musharraf's sacking of the chief justice last spring, the lawyers' protests that rumbled on throughout the summer and the bloody storming of the Red Mosque in June, followed by a wave of hideous suicide bombings, all gave the impression of a country stumbling from bloody crisis to bloody crisis. By the autumn it had grown even worse. The military defeats suffered by the Pakistani army at the hands of pro-Taliban rebels in Waziristan, the declaration of a state of emergency and, finally, the assassination of Benazir Bhutto led many to predict that Pakistan was stumbling towards full-scale civil war and possibly even disintegration.
All this has of course been grist for the mill for the Pakistan-bashers. Martin Amis, typical of the current rash of instant experts on Islam, wrote recently: "We may wonder how the Islamists feel when they compare India to Pakistan, one a burgeoning democratic superpower, the other barely distinguishable from a failed state." In the run-up to the elections, the Washington Post, among many other commentators, was predicting that the poll would lead to a major international crisis.
That the election went ahead with no more violence and ballot-rigging than is considered customary in south Asian polls, and that a new government will apparently come to power peacefully, unopposed by Musharraf or the army, should now give pause for thought and a calmer reassessment of the country that many have long written off as a basket case.
Certainly, there is no question that during the past few years, and more pressingly since the death of Benazir Bhutto on 27 December last year, Pakistan has been struggling with an existential crisis. At the heart of this lay the central question: what sort of country did Pakistanis want? Did they want a western-style liberal democracy, as envisaged by Pakistan's founder, Muhammad Ali Jinnah? An Islamic republic like Mullah Omar's Afghanistan? Or a military-ruled junta of the sort created by Generals Ayub Khan, Zia and Musharraf, and which has ruled Pakistan for 34 of its 60 years of existence?
That question now seems to have been resolved, at least temporarily. Like most other people given the option, Pakistanis clearly want the ability to choose their own rulers, and to determine their own future. The country I saw over the past few days on a long road trip from Lahore in the Punjab down through rural Sindh to Karachi was not a failed state, nor anything even approaching the "most dangerous country in the world".
It is true that frequent shortages of electricity made the country feel a bit like Britain during the winter of discontent, and I was told at one point that I should not continue along certain roads near the Bhutto stronghold of Larkana as there were dacoits (highwaymen) ambushing people after dark. But by and large, the countryside I passed through was calm, and not obviously less prosperous-looking than its subcontinental neighbour. It was certainly a far cry from the terminal lawlessness and instability of post-occupation Iraq or Afghanistan.
The infrastructure of the country is still in many ways better than that of India, and Pakistan still has the best airports and road network in the region. As for the economy, it may be in difficulties, with fast-rising inflation and shortages of gas, electricity and flour; but over the past few years the Pakistani economy has been growing almost as strongly as that of India. You can see the effects everywhere: in 2003 the country had fewer than three million cellphone users; today there are almost 50 million. Car ownership has been increasing at roughly 40 per cent a year since 2001; foreign direct investment has risen from $322m in 2001 to $3.5bn in 2006.
Pakistan is clearly not a country on the verge of civil war. Certainly it is a country at the crossroads, with huge economic and educational problems, hideous inequalities and serious unresolved questions about its future. There is much confusion and disillusion. There is also serious civil unrest, suicide bombings and an insurgency spilling out of the tribal areas on the Afghan border. But judging by the conversations I had, it is also a resilient country that now appears to recognise democracy as its best hope. On my recent travels I found an almost unanimous consensus that the mullahs should keep to their mosques and the military should return to their barracks, like their Indian counterpart. Much violence and unrest no doubt lie ahead. But Pakistan is not about to fall apart.
* * *
Elections in south Asia are treated by the people of the region as operating on a quite different basis from those in the west. In Pakistan, as in India, elections are not primarily about ideology or manifesto promises; instead, they are really about power and patronage.
For most voters, elections are about choosing candidates who can outbid their rivals by making a string of local promises that the electors hope they will honour once they get into office. Typically, a parliamentary candidate will go to a village and make promises or give money to one of the village elders, who will then distribute it among his bradari, or clan, which will then vote for the candidate en bloc. To win an election, the most important thing is to win over the elder of the most powerful clan in each village. As well as money, the elder might ask for various favours: a new tarmac road to the village or gas connections for his cousins. All this costs the candidate a considerable sum of money, which it is understood he must then recoup through corruption when he gets into office; this is why corruption is rarely an important election issue in Pakistan: instead, it is believed to be be an indispensable part of the system.
According to the conventional wisdom in Pakistan, only one thing can overrule loyalty to a clan, and that is loyalty to a zamindar (feudal landowner). Democracy has never thrived in Pakistan in part because landowning has historically been the social base from which politicians emerge, especially in rural areas. Benazir Bhutto was from a feudal family in Sindh; so is Asif Zardari, her husband and current co-chairman of the Pakistan People's Party (PPP), as also is Makhdoom Amin Fahim, the most likely candidate for prime minister. The educated middle class - which in India gained control in 1947 - and even more so the rural peasantry, are still largely excluded from Pakistan's political process. There are no Pakistani equivalents of Indian peasant leaders such as Laloo Prasad Yadav, the village cowherd-turned-former chief minister of Bihar, or Mayawati, the Dalit (untouchable) leader and current chief minister of Uttar Pradesh.
Instead, in many of the more backward parts of Pakistan, the local feudal landowner could usually expect his people to vote for his chosen candidate. As the writer Ahmed Rashid put it, "In some constituencies if the feudals put up their dog as a candidate, that dog would get elected with 99 per cent of the vote."
Such loyalty could be enforced. Many of the biggest zamindars are said to have private prisons, and most of them have private armies. In the more remote and lawless areas there is also the possibility that the zamindars and their thugs will bribe or threaten polling agents, then simply stuff the ballot boxes with thousands of votes for themselves.
Yet this is now clearly beginning to change, and this change has been give huge impetus by the national polls. The election results show that the old stranglehold on Pakistani politics that used to reduce national polls to a kind of elective feudalism may finally be beginning to break down. In Jhang district of the rural Punjab, for example, as many as ten of the 11 winning candidates are from middle-class backgrounds: sons of revenue officers, senior policemen, functionaries in the civil bureaucracy and so on, rather than the usual zamindars.
The Punjab is the richest and most developed part of rural Pakistan; but even in backward Sindh there are signs of change, too. Khairpur, on the banks of the Indus, is the heartland of exactly the sort of unreformed local landowners who epitomise the stereotype painted by metropolitan Pakistani sophisticates when they roll their eyes and talk about "the feudals". Yet even here, members of the local middle class have just stood successfully for election against the local zamindars.
Nafisa Shah is the impeccably middle-class daughter of a local lawyer promoted in the PPP by Zulfiqar Ali Bhutto in the 1970s; she is currently at Oxford doing a PhD in honour killings. She was standing in the same constituency as Sadruddin Shah, who is often held up as the epitome of feudal excess, and who went electioneering with five pick-up trucks full of his private militia, armed with pump-action shotguns.
As you drive along the bypass his face, complete with Dick Dastardly moustache, sneers down from hoardings placed every 50 yards along the road. In the past week the local press had been full of stories of his men shooting at crowds of little boys shouting pro-Benazir slogans. Shah was standing, as usual, for no fewer than three different seats; this time, however, to the amazement of locals, the PhD student and her PPP allies have all but wiped out Shah and his fellow candidates of the PML-Functional, so that Shah himself won only in his own home town.
Even the most benign feudal lords suffered astonishing reverses. Mian Najibuddin Owaisi was not just the popular feudal lord of the village of Khanqah Sharif in the southern Punjab, he was also the sajjada nasheen, the descendant of the local Sufi saint, and so regarded as a holy man as well as the local landowner. But recently Najibuddin made the ill-timed switch from supporting Nawaz Sharif's PML-N to the pro-Musharraf Q-league. Talking to the people in the bazaar before the election, his followers announced that they did not like Musharraf, but they would still vote for their landlord:
"Prices are rising," said Haji Sadiq, the cloth salesman, sitting amid bolts of textiles. "There is less and less electricity and gas."
"And what was done to Benazir was quite wrong," agreed his friend Salman.
"But Najib Sahib is our protector," said the haji. "Whatever party he chooses, we will vote for him. Even the Q-league."
"Why?" I asked.
"Because with him in power we have someone we can call if we are in trouble with the police, or need someone to speak to the adminstration," he said.
"When we really need him he looks after us."
"We vote according to local issues only. Who cares about parties?"
Because of Najibuddin's personal popularity, his vote stood up better than many other pro-Musharraf feudals and he polled 38,000 votes. But he still lost, to an independent candidate from a non-feudal, middle-class background named Amir Waran, who took 59,000 votes and ousted the Owaisi family from control of the constituency for the first time since they entered politics in the elections of 1975.
* * *
If the power of Pakistan's feudals is beginning to be whittled away, in the aftermath of these unexpectedly peaceful elections there remain two armed forces that can still affect the future of democracy in the country.
Though the religious parties were routed in the election, especially in the North-West Frontier where the ruling religious MMA alliance was wiped out by the secular ANP, their gun-wielding brothers in Waziristan are not in retreat. In recent months these militants have won a series of notable military victories over the Pakistani army, and spread their revolt within the settled areas of Pakistan proper.
The two assassination attempts on Benazir - the second one horribly successful - and the three recent attacks on Musharraf are just the tip of the iceberg. Every bit as alarming is the degree to which the jihadis now control much of the north-west of Pakistan, and the Swat Valley is still smouldering as government troops and jihadis loyal to the insurgent leader Maulana Fazllullah - aka "Mullah Radio" vie for control. At the moment, the government seems to have won back the area, but the insurgent leaders have all escaped and it remains to be seen how far the new government can stem this growing rebellion.
The second force that has shown a remarkable ability to ignore, or even reverse, the democratic decisions of the Pakistani people is of course the army. Even though Musharraf's political ally the PML-Q has been heavily defeated, leaving him vulnerable to impeachment by the new parliament, the Pakistani army is still formidably powerful. Normally countries have an army; in Pakistan, as in Burma, the army has a country. In her recent book Military, Inc, the political scientist Ayesha Siddiqa attempted to put figures on the degree to which the army controls Pakistan irrespective of who is in power.
Siddiqa estimated, for example, that the army now controls business assets of roughly $20bn and a third of all heavy manufacturing in the country; it also owns 12 million acres of public land and up to 7 per cent of Pakistan's private assets. Five giant conglomerates, known as "welfare foundations", run thousands of businesses, ranging from street-corner petrol pumps and sprawling industrial plants to cement and dredging to the manufacture of cornflakes.
As one human rights activist put it to me, "The army is into every business in this country. Except hairdressing." The army has administrative assets, too. According to Siddiqa, military personnel have "taken over all and every department in the bureaucracy - even the civil service academy is now headed by a major general, while the National School of Public Policy is run by a lieutenant general. The military have completely taken over not just the bureaucracy but every arm of the executive."
But, for all this power, Musharraf has now comprehensively lost the support of his people - a dramatic change from the situation even three years ago when a surprisingly wide cross-section of the country seemed prepared to tolerate military rule. The new army chief, General Ashfaq Kayani, who took over when Musharraf stepped down from his military role last year, seems to recognise this and has issued statements about his wish to pull the army back from civilian life, ordering his soldiers to stay out of politics and give up jobs in the bureaucracy.
Though turnout in the election was low, partly due to fear of suicide bombings, almost everyone I talked to was sure that democracy was the best answer to Pakistan's problems, and believed that neither an Islamic state nor a military junta would serve their needs so well. The disintegration of the country, something being discussed widely only a week ago, now seems a distant prospect. Rumours of Pakistan's demise, it seems, have been much exaggerated.
William Dalrymple's latest book, "The Last Mughal: the Fall of a Dynasty (Delhi, 1857)", published by Bloomsbury, won the 2007 Duff Cooper Prize for History
Timeline to the vote
6 October 2007 General Musharraf wins most votes in presidential election. The Supreme Court says no winner can be announced formally until it rules whether the general was eligible to stand while he was still army chief
18 October Exiled former premier Benazir Bhutto returns to Pakistan
3 November Musharraf declares emergency rule - caretaker government is sworn in
9 November Bhutto placed briefly under house arrest
28 November Musharraf resigns as army chief. Sworn in as president for second term
29 November Chief election commissioner announces elections are to be held on 8 January
15 December State of emergency lifted
27 December Benazir Bhutto is assassinated at rally near Rawalpindi
2 January 2008 Elections postponed till 18 February
18 February Parliamentary elections. Low turnout amid fears of violence
19 February Musharraf's party concedes defeat