WASHINGTON—Historians will one day wonder how it was that the world’s leading democracies came to rely on Gen. Pervez Musharraf to lead the cause against Islamic fundamentalism in a region central to that struggle.

The idea behind Musharraf’s support was that his authoritarian army would crush religious terrorist groups. Instead, the influence of fanatics in Pakistan’s political and military institutions has grown under his watch. To judge by the Taliban’s comeback in neighboring Afghanistan (with support from allies in Pakistan) and al-Qaeda’s increasing activities in the tribal areas along Pakistan’s western border, Musharraf’s contribution to the war on terrorism seems rather pathetic.

The general is now making a mockery of any notion of the rule of law in order to remain president and head of the armed forces. By stepping over institutions such as the Pakistani Supreme Court, he has unleashed precisely what his macho rule was supposed to prevent—chaos and civil strife. Needless to say, such an environment is a godsend to violent fundamentalists who will welcome the state’s distraction from the goal of hunting them down and the increasing disgust of the civilian population with military rule.

None of this was difficult to anticipate. Military rulers cannot govern without making some sort of alliance with key civilian groups. Musharraf, whose party basically is a spinoff from the Pakistan Muslim League, has allied himself with Muttahida Majlis-e-Amal, a coalition of Muslim political organizations with close ties to fundamentalists. Furthermore, the organization that he has placed in a position of absolute power, the army, is disproportionately made up of Pashtuns, an ethnic group that is dominant in the tribal areas in which al-Qaeda is active. In fact, according to Imran Khan, a former cricket star who has been active in Pakistani politics in recent years and has ties to the religious establishment, it is the Pakistani intelligence services that have been funding religious fundamentalists in his country. Other observers such as the scholar Rohan Gunaratna, who closely follows terrorism in Asia and has advised Western governments, have said similar things for years.

By heavily repressing former Prime Minister Benazir Bhutto’s Pakistan People’s Party and former Prime Minister Nawaz Sharif’s Muslim League, the current government rid itself of the few available means that Pakistan had of diluting fundamentalism in Pakistan’s society. The sheer vanity of perpetuating his personal rule undermined the country’s delicate balance between theocrats and secularists and exacerbated the already powerful tensions running through his unstable nation.

For the umpteenth time in history, a military ruler who promised to bring order has generated worse disorders than those he set out to correct. There is no question that Pakistan’s two large political organizations bear great responsibility for Musharraf’s existence. Bhutto’s and Sharif’s corrupt and inept governments did much to undermine democracy in the 1980s and 1990s. In my three trips to Pakistan in the 1990s, I got the impression that by eroding the prestige of the democratic institutions, the civilian leaders were playing into the hands of fundamentalists—whose growing presence one could easily sense everywhere from Islamabad to Lahore to Peshawar. It was only a matter of time before a dictator would promise to clean up the mess created by democrats. It happened in 1999, when Musharraf kicked Sharif out and placed himself in control of the government. Then 9/11 gave Pakistan’s thug the opportunity to do what autocrats had done in the Arab world: present his autocracy as the only guarantee against the emergence of theocracy.

Leaders in Washington, London and other Western nations have now belatedly realized that dictatorship was not the solution to the problems that had been incubated during Pakistan’s democratic period. They should have known better. Civilian rule has been ineffective in Pakistan partly because the military has given civilians little time in the country’s 60-year history to develop strong institutions.

The support given Musharraf by Western democracies has weakened the moral prestige of the war on terrorism among many people who think that the push for the democratization of the Muslim world is really a fig leaf for American hegemony. It will not be easy for a future civilian government in Islamabad to sell to the Pakistani public the idea that the liberal democracies of the West are their friends.