U.S. Secretary of State Condoleezza Rice offered "deep gratitude" Monday for resigning Pakistani President Pervez Musharraf's decision to join the U.S.-led fight against extremists, but she was careful to signal strong U.S. support for the civilian government that pushed Musharraf aside.

Musharraf, who took power in a 1999 coup, became a close ally of the United States after the Sept. 11, 2001, terror attacks. His popularity fell sharply in Pakistan after he ousted dozens of judges and imposed emergency rule last year, and the Bush administration has been distancing itself from the former army general since the election of a new civilian government in February.

Hours after Musharraf announced his resignation to avoid impeachment at the hands of his political enemies, Rice said, "The United States supported the transition to democratic government in Pakistan and respects the results of the election." The reference was to parliamentary elections that Musharraf's rivals won. "We believe that respect for the democratic and constitutional processes in that country is fundamental to Pakistan's future and its fight against terrorism," Rice said.

In her statement, Rice noted that "Musharraf made the critical choice to join the fight against al-Qaida, the Taliban and other extremist groups that threaten the peace and security of Pakistan, its neighbors and partners throughout the world. For this, he has our deep gratitude."

She called Musharraf "one of the world's most committed partners in the war against terrorism and extremism."

An emotional Musharraf told Pakistanis in a televised speech that he wanted to spare Pakistan a dangerous power struggle with opponents vowing to impeach him. He said he was satisfied that all he had done "was for the people and for the country."

In Musharraf, the West had a stalwart ally in the fight against al-Qaida and Taliban militants. However, his influence has faded since he stepped down as army chief last year. Pakistan also has faced criticism from the United States that it was not doing enough to fight extremists operating along the Afghan-Pakistan border.

Many Pakistanis blame rising militant violence on Musharraf's use of the army against fighters based in the northwestern part of the country.