IT'S NOT SURPRISING that Pakistan's president, Gen. Pervez Musharraf, intends to break his commitment to retire as army chief of staff by the end of this year and thereby restore civilian rule to Pakistan five years after he led a coup against an elected government. After all, Mr. Musharraf has betrayed nearly every promise he has made about democracy and social reform in Pakistan. What's interesting is his timing: The general chose to reveal his intentions just days before his planned meeting in New York tomorrow with President Bush.

Mr. Bush has cast himself as a champion of democracy in the Muslim world, repudiating the past U.S. practice of backing authoritarian rulers when expedient. Yet Mr. Musharraf obviously believes he has nothing to fear. In fact, he was probably encouraged in his latest reversal by signals from Washington. Despite his continual repression of political opponents, Mr. Musharraf is toasted by senior administration officials, who describe his government as a "major non-NATO ally." His latest announcement prompted a State Department statement that the administration "fully share[s]" Mr. Musharraf's "vision for Pakistan's future."

Nor is there much dissent outside the administration. Democratic nominee John F. Kerry has said that democracy would not be a priority in his dealings with Pakistan. The bipartisan Sept. 11 commission concluded that "Musharraf's government represents the best hope for stability in Pakistan and Afghanistan" and proposed that the United States offer him "promises it is prepared to keep, for years to come."

Why such coddling? Mr. Musharraf has won widespread sympathy in Washington for his willingness to take on al Qaeda, both in Pakistan's cities and in remote provincial areas. Hundreds of its fighters reportedly have been killed, and Mr. Musharraf has narrowly dodged two apparently retaliatory assassination attempts. The general also periodically delivers speeches and writes articles endorsing a strategy of "enlightened moderation" for Islam, including the acceptance of democracy.

But Mr. Musharraf plays a double game. While attacking al Qaeda's foreign fighters, he is more tolerant of Taliban militants who operate from western Pakistan into neighboring Afghanistan -- and he has never acted decisively against the Islamic extremists who promote terrorism in Indian-controlled Kashmir. He allowed the most extensive nuclear smuggling network in history to operate under his nose, supplying bomb materials to Iran, Libya and North Korea -- and when it was uncovered, he pardoned its leader and refused to cooperate with a subsequent U.N. investigation. He promises to restore democracy in Pakistan, but he has done his best to destroy the secular political parties and civil society that would be the logical allies of "enlightened moderation," while building up Islamic parties that espouse the very extremism he says he opposes.

U.S. officials argue that partnership with Mr. Musharraf is the safest course in an unstable country with its own nuclear arsenal. Yet that doesn't mean that Mr. Bush should accept Mr. Musharraf's cooperation on al Qaeda -- something that is in his own interest -- as sufficient return on the $3 billion in U.S. aid his regime has been promised. A long-term alliance between the United States and Pakistan must depend as well on progress toward democracy and civilian rule, cooperation on nuclear proliferation, and action against Islamic extremists of all kinds. By failing to insist on such steps -- and by tolerating moves in the other direction -- Mr. Bush stores up more trouble for Pakistan's future.