The unexpected military takeover of Pakistan by Gen. Pervez Musharraf, the army chief of staff, has presented U.S. policymakers with a dilemma they have not had to confront in this region since the latter years of the Cold War: how to balance American security interests with American democratic ideals.

Within a day of Musharraf's takeover last Tuesday, a debate had begun among American diplomats in the region and officials in Washington about how to respond to the coup against Prime Minister Nawaz Sharif, a democratically elected leader but one whose ouster was welcomed by the vast majority of Pakistanis.

On one hand, U.S. officials said, there was a natural inclination in Washington to press the new Pakistani government to immediately restore democracy. Doing otherwise, they feared, would send the wrong message to ambitious generals who might be tempted to challenge democratic governments in other parts of the world.

At the same time, Sharif was wildly unpopular. Diplomats in the region argued that it might make sense to work with Musharraf unless his regime turns repressive.

The outcome of that debate was reflected in Sunday's carefully calibrated statement by State Department spokesman James P. Rubin, who praised Musharraf's pledge to restore democracy and urged him to do so quickly--but stopped short of calling for the reinstatement of Sharif, who remains under house arrest.

"I think everyone realized that Sharif was immensely unpopular at home and his restoration was a nonstarter, so I think from the outset we took into account the dynamic on the ground," said an administration official who spoke on condition of anonymity. "Realizing Sharif's precarious position and our opposition to military takeovers generally, we crafted a process in the middle."

But the failure of the world's most powerful democracy to defend a democratically elected leader has generated charges of hypocrisy. On her current tour of Africa, Secretary of State Madeleine K. Albright has repeatedly faced questions from African journalists expressing concern about the implications for their own continent of the "soft" U.S. reaction to the Pakistani coup.

"I think the main message here is that the United States does not support any military takeovers or coups," Albright told journalists in Freetown, Sierra Leone, where a freely elected government was deposed in 1997 by military officers, then restored amid much bloodshed. "That is not the way to deal with problems. We believe that it is essential for democracies to use democratic processes to work out problems."

In Washington, a senior administration official said the cautious U.S. response to the coup was partly a reflection of uncertainty about Musharraf's plans for governing. "It's clear they did not have a fully laid-out plan of action once they took power," the official said. "All of this says . . . that they are still open to hearing what the international community has to say."

Almost immediately after the takeover, Western diplomats in Islamabad began to receive signals that Musharraf wanted to reach out to the West, pursue a reformist agenda at home and exercise restraint in foreign policy. Within several days, some were suggesting that his regime might offer "new opportunities" for working on key regional issues such as the dispute with India over Kashmir.

"There are no illusions about the nature of the government that was deposed, and there is a recognition of some possibilities that the army might be helpful on some issues, rather than making them worse," said one Western diplomat last week.

The Clinton administration's cautious tone contrasted with that of Britain and the Commonwealth nations, which suspended Pakistan this week from participating in their decision-making council. On Friday morning, the diplomatic pragmatists received a sharp jolt when Musharraf announced a state of emergency and said he was taking over as chief executive. But later that day, U.S. Ambassador William B. Milam met for 90 minutes with Musharraf, emerging both impressed and reassured.

At the same time, there were those in both the Pakistani and American capitals who recalled that when Gen. Zia ul-Haq seized power in 1977, he promised to hold elections within 90 days. Instead, Zia ruled, often harshly, until his death in a plane crash in 1988. U.S. officials, despite initial misgivings about the coup, ultimately came to regard Zia as a staunch Cold War ally.

Constable reported from Islamabad, Lancaster from Washington. Staff writer Karl Vick also contributed to this report from Abuja, Nigeria.