For almost seven years, pundits from all horizons have predicted an early demise for Pakistan President Pervez Musharraf. Just six weeks after Musharraf won power in a bloodless coup, a Pakistani-American financier sent me an “urgent” e-mail quoting his “reliable sources” that the general would soon be ousted.

It is, therefore, no surprise that Musharraf is at the center of speculations about “imminent dramatic changes” in Pakistan once again. Musharraf’s setback in his ill-advised duel with the head of the Supreme Court, and the carnage at the Red Mosque in the heart of Islamabad, the Pakistani capital, are cited as indicators that the president is on his way out.

However, a closer look at Pakistan’s complex situation might reveal a different picture. Not only Musharraf is not on his way out but looks as if Pakistan might need him more than any other time.

There are several reasons for this.

First, faced with the growing challenge of radical Islamists, the last thing Pakistan needs is a military coup or any other dramatic regime change. Any institutional crisis at the summit of the state would only undermine its legitimacy and thus encourage elements that wish to replace the republic with a Taleban-style “Islamic emirate.”

Secondly, there is no charismatic figure at the moment to bring the nation’s disparate forces together in a moment of dangerous transition.

Finally, Pakistan could ill-afford another military coup in economic terms. The undoubted successes that Musharraf has achieved in restoring the national economy to growth and attracting unprecedented foreign direct investment could be quickly undone as tanks roll in the streets of Islamabad.

The best bet for Pakistan is for Musharraf to stay at his post until after the next general election. And, then, he should be asked to choose between the presidency and command of the armed forces.

This, however, does not mean business as usual as far as the president is concerned. While Musharraf’s overall performance in office remains positive, he would be ill advised not to recognize the negatives in his record.

The first of these stems from an illusion shared by all military rulers of Pakistan: To abolish the country’s political life which, despite its many faults and endemic corruption, has struck deep roots in the nation’s psyche.

Gen. Iskander Mirza saw Pakistan as a latifundia with himself as benevolent despot. Field Marshall Ayub Khan spoke of “guided democracy”, an oxymoron. In his rare sober moments, Gen. Yahya Khan would lament his people’s “obsession with politics and elections” and dream of a system in which all decisions were taken by “those who know the best interests of the nation”, that is to say himself and his pals. As for Gen. Zia ul-Haq, not content with dictating the destiny of the country, he also wanted to write the script of his people’s private lives.

Musharraf is certainly not as delusional as any of his predecessors.

In fact, he could be regarded as the only one to have preserved his sanity. Nevertheless, he, too, thinks that politics is a messy, dishonest and, ultimately, unnecessary business. He, too, has tried to destroy the deep-rooted political currents that, under different labels and leaders, have provided Pakistan with a lively, though far from perfect, political life.

In recent weeks, however, there have been signs that Musharraf may be toning down his anti-political, which ultimately means anti-democratic, prejudices. In that context, the general was able to swallow his deep dislike of former Prime Minister Benazir Bhutto and meet her for what seems to have been a useful encounter last month.

Musharraf does not need to change his personal sentiments toward Ms. Bhutto. What he has to do, however, is to acknowledge the fact that Bhutto cannot be scripted out of Pakistan’s political life.

Musharraf has another bitter pill to swallow: Lifting the ban he has imposed on other political parties and personalities, including former Prime Minister Nawaz Sharif. By excluding Pakistan’s traditional, and people-based parties and leaders, Musharraf left the field open for the very Taleban-style groups that are trying to murder him.

If our information is correct, Musharraf now knows that he is closer to Bhutto and Sharif than to the fanatical demagogues who preach murder and mayhem in the name of religion.

What Pakistan needs is a democratic front against terrorism. Musharraf alone cannot create such a front. Only leaders and parties that can mobilize the Pakistani silent majority would be able to isolate and ultimately defeat the terrorists.

Musharraf also seems to have taken a decisive step toward correcting his major foreign policy mistake: Hedging his bets in Afghanistan.

After the fall of the Taleban, the leadership in Islamabad, and Musharraf among them, watched with consternation as decades of investment by the Pakistani state appeared to be going up in smoke. Musharraf joined the US-led war on terror but decided to keep some chips on the Taleban, and kindred groups. While it is unfair to blame Pakistan for keeping the remnants of the Taleban alive — for they also get support from radical Islamists throughout the world — there is no doubt that Musharraf has done less than his 100 percent in fighting them.

Part of the blame for this lies with the new Afghan leadership under President Hamid Karzai. Boosted by support from Washington, the new Afghan ruling elite revived Kabul’s traditionally anti-Pakistan strategy. It also cultivated ties with India, Russia, and the Islamic Republic of Iran in anticipation of an eventual American withdrawal.

One of message that President George Bush passed on to Karzai, during their meeting in Washington lat week, was a US demand for a speedy improvement in relations between Afghanistan and Pakistan.

As two nations that represent the key frontlines of the war on terror, Afghanistan and Pakistan cannot afford to play with each other’s security on the basis of petty prejudices and shop-worn irredentist dreams.

To defeat terrorism, Pakistan needs national unity. And that could be achieved only through free elections open to all parties and leaders and, preferably, under a neutral caretaker government. Once the internal democratic front is in place, Pakistan would also need to develop a united front with Afghanistan to pursue the war against terror to ultimate victory, with or without NATO.

On both counts, Musharraf still has a major role to play. News of his imminent political demise may well prove premature.