Pakistan is at last finding its voice. The US would be wise not to gag it

Given the bleak economic and security situation in Pakistan, it is easy to forget that 2008 has also been a year of positive events for the country. February's elections proved that it is possible to hold free and fair polls in Pakistan, that in such circumstances undemocratic leaders such as Musharraf and his allies will be trounced, and (yet again) that the notion of broad public support for the parties of the religious right is a myth.

In the subsequent six months, the electorate has demonstrated another quality: patience. Despite sky-high inflation and crippling power shortages, Pakistan has not witnessed the sort of destabilising mass protests that history has shown Pakistanis to be capable of. Rather, frustrated though they are, people are prepared to wait. Seemingly by popular consensus, the democratic setup is being given time to find its feet.

Similarly, the resignation of President Musharraf is not only a sign of politicians implementing a core demand of their constituents but also a remarkable departure from the past. Consider how the country's first three dictators left power: Ayub Khan passed the baton to his successor as army chief; Yahya Khan departed after a catastrophic military defeat; Zia-ul-Haq died in a suspicious air crash. But Musharraf has given way to an elected government after being told firmly, yet with considerable restraint, that he must go or face the constitutional process of impeachment.

The volatility of Pakistan's history makes me cautious of claiming that something fundamental has changed, but I suspect it may have. Last year, images of Pakistani lawyers in suits clashing with staff-wielding police officers made the newspapers for good reason. It is significant that in a country where those in power (soldiers, tribal chiefs, bureaucrats, landlords, the wealthy) have traditionally mistreated the weak with impunity, the demand for the rule of law has gained mass support.

So popular has this cause become that even now, almost a year after Musharraf dismissed independent-minded members of the higher judiciary, politicians cannot wriggle free of expectations for their restoration. In my memory, this is perhaps Pakistan's first example of a secular, issue-based special interest group succeeding in setting the country's political agenda by winning over the electorate and creating a vote bank that politicians know they must take seriously. It is, in other words, a rousing example of democracy in action.

None of this would have been possible without the power of television. When I grew up, in the 1980s, public space in Pakistan was virtually nonexistent: political thugs controlled most university campuses; protest rallies were violently disrupted; being a journalist was a dangerous profession; theatre and dance were discouraged; and legal and informal rules erected hurdles to young women and men congregating together. The country's attention was kept fragmented - except for communication from the state, which exploited its monopoly on text books, radio, and television for purposes of propaganda.

Musharraf (although he tried unsuccessfully to undo it in the end) opened up television to private ownership and allowed channels to operate freely. The impact on Pakistan cannot be overestimated. News programmes, talk shows, sitcoms, music videos, religious exegesis, cooking and fashion suddenly filled the nation's screens. A giant public space was created, and viewers flocked to it. Television has given Pakistan a truly open national forum for the first time in its history. Ideas are debated, leaders are assessed and criticised, and a nation of 170 million people is finally discovering, together, what it thinks.

Where this will lead is difficult to predict, especially as squabbling among the country's politicians or the action of outside powers could easily derail Pakistan's promising experiment with democracy. But if this does not happen, it is likely that Pakistan will continue to become more aware of, and more responsive to, the will of its own people.

This is no small development. The will of the people is not always a guide to what is morally right. But it is at least a guide to self-interest. And Pakistan has acted with remarkable frequency against its evident self-interest since its foundation. Failing to spend on education and health? Ignoring a chronic shortage of clean drinking water? Accepting near-universal tax evasion by the rich? Opening the borders to heroin and weapons? Whatever one's politics, it is hard to believe that these are the policies most Pakistanis believe to be in their self-interest - but these are what, until now, they have accepted.

The world seems concerned with Pakistan primarily as an actor in global attempts to combat terrorism. As a democracy, Pakistan's role in this drama is likely to change because a great tension at the centre of the US-Pakistan alliance will increasingly be exposed. That tension, in a nutshell, is this: most Pakistanis are anti-America. For a combination of reasons, and despite evident fondness for American products and individuals, my impression is that most Pakistanis have extremely negative views of the US as a geopolitical player.

Building an alliance on such a foundation has been difficult. In the absence of highly unlikely reversals of US positions on a whole range of international issues, Pakistan's democracy and the power of the country's new national electronic forum will make maintaining the US-Pakistan alliance trickier still. Pakistani politicians may attempt to avoid the problem by hypocritically asserting one thing to America and another to the Pakistani people. But Musharraf has already discovered that Pakistanis are becoming aware of such double-speak and finding it repugnant.

The anti-America sentiment suggests that Pakistanis would like greater independence in their relationship with the US. But the moribund state of Pakistan's economy and the fraught nature of its security situation make the country utterly dependent on US aid and eager for hi-tech American weaponry. The challenge facing Pakistan's new leaders is to explain that Pakistanis cannot have both. If they are to satisfy their constituents, they will need to articulate a plan for increasingly putting Pakistan's interests first while gradually reducing the country's reliance on the US.

The US, for its part, will need to adjust to a Pakistan in which anti-America sentiment could seriously undermine US interests. The US can best do this by offering Pakistan not the appearance of an alliance but the equality and mutual respect that constitutes the substance of one. Pakistan's people have already demonstrated through the ballot that they reject the Taliban worldview, and the number of Pakistanis who died in terrorist attacks last year alone exceeds the number of Americans killed on 9/11. Pakistan should be allowed to determine how best to fight extremists on its soil. Pakistani solutions are likely to be slower and more cautious than US ones, but also, crucially, more sustained and popular, and therefore more effective in the long run.

It is by no means clear whether the US can be convinced to accept Pakistan's lead, especially as the implications for Afghanistan of doing so seem to clash with the muscular, foreign occupation-style approach being advocated by both US presidential candidates. Nor is it clear whether Pakistan's politicians can develop a strategy for delivering what voters want while addressing America's (and the powerful Pakistani military's) concerns. But democracy was never going to be easy. One can only hope that this time Pakistan's experiment with it will be allowed to succeed.

Mohsin Hamid, the author of The Reluctant Fundamentalist.