ISLAMABAD, Pakistan - Facing imminent impeachment charges, President Pervez Musharraf announced his resignation yesterday, after months of belated recognition by U.S. officials that he had become a waning asset in the campaign against terrorism.
The decision removes from Pakistan's political stage the leader who for nearly nine years served as one of the United States' most important - and ultimately unreliable - allies. And it now leaves U.S. officials to deal with a new, elected coalition that has so far proved itself to be unwilling or incapable of confronting an expanding Taliban insurgency determined to topple the government.
"Whether I win or lose the impeachment, the nation will lose," Musharraf said, explaining his decision in an emotional televised speech lasting more than an hour. He will stay in Pakistan and will not be put on trial, government officials said.
The question of who will succeed Musharraf is certain to unleash intense wrangling between the two rival political parties that form the governing coalition and to add a new layer of turbulence to an already unstable nuclear-armed nation of 165 million people.
"We've said for years that Musharraf is our best bet, and my fear is that we are about to discover how true that was," one senior administration official said, acknowledging that the United States had stuck with Musharraf for too long and developed few other relationships in Pakistan to fall back on.
Bush administration officials will now have to find allies within the fractious civilian government, which has so far shown scant interest in taking on militants from the Taliban and al-Qaida who have roosted in Pakistan's badlands along the border with Afghanistan.
At the same time, suspicions between the U.S. and Pakistani intelligence agencies and their militaries are deepening, and relations between the two countries are at their lowest ebb since Musharraf pledged to ally Pakistan with the United States after the Sept. 11 attacks.
Among the greatest concerns, senior U.S. officials say, is the durability of new controls over Pakistan's nuclear program. Though Pakistan has been through far more abrupt political transitions than this one - through assassinations, a mysterious plane crash and coups - this is the first since it amassed a large nuclear arsenal.
Another central concern is the war in Afghanistan, which has been fueled by Taliban and al-Qaida militants who have used Pakistan as a rear base to launch increasingly lethal and sophisticated attacks across the border.
After years in which Musharraf proved unable or unwilling to rein in militants in Pakistan, U.S. officials say they are now more skeptical than ever that they can count on cooperation from Pakistan's military leaders, even including Gen. Ashfaq Parvez Kayani, a former head of Pakistan's spy agency, who replaced Musharraf as military chief last November.
Kayani has stressed to the Americans that his army is demoralized and weary. So far, he has declined to undertake the kind of counterinsurgency training for his soldiers that Washington believes is necessary.
The increasing U.S. mistrust of the Pakistani military, which has depended heavily on U.S. financial support, has been heightened by Kayani's reluctance to move more of the army's focus from the border with India to the tribal areas, a U.S. officer who dealt with the army here for several years said in an interview in July.
"To this day, the military does not see the Taliban as an existential threat to Pakistan," the officer said. The Pakistani army clung to the sovereignty of Pakistan, he said, as a way of keeping U.S. forces out of Pakistan because the presence of the U.S. army "would destroy the image of the Pakistani military."
A main challenge for Washington now will be to fix the attention of the two leaders of the coalition parties, Asif Ali Zardari and Nawaz Sharif, on the raging Taliban insurgency that not only threatens American soldiers in Afghanistan but also to destabilize Pakistan itself.
The campaign against the militants is unpopular here because it is seen as an American conflict foisted on the country. Washington would like the new government to explain that the effort to quell the Taliban is in Pakistan's interests as well.
So far, the coalition, distracted by internal machinations, has failed to make that case, even as the military has taken on the insurgents with new vigor in the past 10 days. Secretary of State Condoleezza Rice sought to emphasize continuity with the new leaders of Pakistan yesterday, saying the United States would keep pressing the Pakistani government to battle extremism within its borders.
President Bush, at his ranch in Crawford, Texas, made no statement about Musharraf's resignation. A White House spokesman, Gordon D. Johnson, said, "President Bush appreciates President Musharraf's efforts in the democratic transition of Pakistan as well as his commitment to fighting al-Qaida and extremist groups."
Uncertainty over who is actually in charge in Pakistan has heightened concerns over the country's nuclear arsenal, which is today variously estimated at 50 to 100 nuclear weapons.
While U.S. officials say publicly they are confident it is secure, in private they have long harbored worries about what would happen when Musharraf no longer stood atop the country's nuclear command structure, which has always been a creation of Musharraf himself. How robust it will prove without him, they say, is a worrisome mystery.
Perhaps the greatest concern is what one senior Bush administration official recently termed "steadfast efforts" by the extremist groups to infiltrate Pakistan's nuclear laboratories, the heart of a vast infrastructure that employs tens of thousands of people. Some of the efforts, officials said, are believed to have involved Pakistani scientists trained abroad.
Pakistan's weapons are considered less of a concern - thanks in part to a secret program launched by the Bush administration, with Musharraf's consent, to help train Pakistani security forces to keep the weapons safe.
In announcing his resignation, from his presidential office here at 1 p.m., Musharraf said he was putting national interest above "personal bravado," adding that he was not prepared to put the office of the presidency through the impeachment process.
The chairman of the Pakistani Senate, Muhammad Mian Soomro, who had served as caretaker prime minister earlier this year, was named acting president. He will keep the office until a new president is chosen by the parliament and four provincial assemblies within 30 days.
Zardari, the widower of Benazir Bhutto and now the head of the Pakistan People's Party, is known to want the job. But he remains something of a controversial figure here, having faced multiple counts of corruption in the past, though he was never convicted and says the charges were politically motivated. They were dropped when Zardari returned to Pakistan earlier this year.