ISLAMABAD -- Pakistan President Pervez Musharraf, a close U.S. ally, is likely to resign soon following secret talks aimed at easing his departure, people familiar with the situation say.

A series of missteps over the past year have unleashed a groundswell of opposition to the once-powerful former army chief. Pakistan's Parliament was expected to take up impeachment proceedings against him as soon as Monday.

Mr. Musharraf continues to tell supporters he intends to fight the impeachment charges. But his departure is now likely following a breakthrough in the talks with government officials, according to two people familiar with his situation.

"Musharraf will neither face impeachment nor be prosecuted," said one person familiar with the situation. He is expected to step down once a guarantee of safe passage and immunity from prosecution has been struck. "We expect a major development in the next 48 hours," this person said.

A spokesman for Mr. Musharraf couldn't be reached for comment.

If he quits, it would bring to an end a tumultuous nine years at the pinnacle of power in the volatile nation. During that time, Mr. Musharraf closely allied Pakistan with the U.S. after the 2001 terrorist attacks, and he liberalized and stimulated the nation's economy. But he ultimately wound up on the political sidelines due to the democratic forces he helped unleash.

How Pakistan fares in a post-Musharraf era is of paramount concern to the U.S., where officials have become increasingly concerned about the country's direction. Mr. Musharraf's pro-American stance and his military campaign against Islamic insurgents in his country have given way to a troubled strategy of peace deals with militants.

The activities of the Inter-Services Intelligence, Pakistan's premier spy agency, have also raised worries abroad. Afghanistan and India have blamed a suicide bombing last month at the Indian embassy in Kabul on Islamic militants backed by Pakistani intelligence agents. Pakistan's government has denied the charges. Officials of the North Atlantic Treaty Organization and the U.S. have urged Pakistan to rein in its spies, and to do more to prevent attacks on U.S. and NATO troops in Afghanistan by militants holed up in Pakistan's lawless border region.

Mr. Musharraf, 65 years old, has been under intensifying political pressure to leave office. Pakistan's coalition government, led by his political opponents, has been preparing a list of impeachment charges, based in part on Mr. Musharraf's declaration of a temporary state of emergency last fall.

During that time, he was re-elected to a five-year term as president in a controversial vote by an electoral college. That vote was part of a transition to democracy that Mr. Musharraf had long pledged to bring about. The transition culminated in February parliamentary elections that installed into the government his chief political opponents, led by the Pakistan People's Party of slain former Prime Minister Benazir Bhutto.

Some of Mr. Musharraf's supporters continued to suggest that he would resist being driven from office. Muhammad Intikhab Khan, a top official in the pro-Musharraf Pakistan Muslim League (Q), said Mr. Musharraf told a group of about 40 officials on Wednesday that he would "fight the impeachment" and believed he still had the votes to prevail. "No, he's not going to" quit, said Mr. Khan.

Another ally, former railways minister Sheikh Rashid Ahmed, also met Mr. Musharraf Wednesday. "He's not going to give in to this pressure," Mr. Ahmed said. "He has the ability to resist."

In recent days, however, Mr. Musharraf's resistance to quitting appears to have weakened. Many of his former supporters joined a series of resolutions in provincial assemblies that overwhelmingly called on him to hold a no confidence vote in Parliament, or to resign.

Pakistan's army, long the nation's most powerful institution, does not appear ready to intervene on his behalf. The army chief, Gen. Ashfaq Parvaz Kayani, has promised to keep the military out of politics, although military officials have made it clear to the government that they don't want to see their former chief humiliated. Mr. Musharraf stepped down as army chief when he started his new presidential term -- part of his plan for a democratic transition.

Ordinary Pakistanis have been growing more dissatisfied with their president. A recent opinion survey found that 75% of Pakistanis disapproved of his performance, according to the poll, by the International Republican Institute, based in Washington. Two years ago, the president's approval rating was 60%, the survey indicated.

Mr. Musharraf's apparent failure to understand the democratic forces he fostered contributed to his problems. Under his leadership, strong economic growth helped create a broad and politically demanding middle class. His relaxation of government controls over television media catapulted political dissent into prime time. His failure to deal decisively with Muslim extremists undermined his authority with many voters. He also cracked down on his country's independent judicial system, a move that came back to haunt him.

Pakistan's newly emboldened citizenry also has been putting pressure on the new government installed in February. That has given hope to some that participatory democracy might take hold in Pakistan, where decades of secretive, strong-armed tactics have characterized both military and civilian governments.

"The leaders of this country will have to realize that something has changed in the country," says Ahmed Bilal Mehboob, executive director for the Pakistan Institute of Legislative Development and Transparency, a parliamentary watchdog group. "If they don't perform, the people will agitate. The old ways are no longer appropriate."

Great Challenges

Some worry that Pakistan's challenges may be too great for any government to tackle. A violent Islamic insurgency has taken hold in Pakistan's border regions with Afghanistan, and is spreading toward frontier cities such as Peshawar. Food and fuel prices have soared, and the stock market has tanked, prompting capital flight. The country's main political parties still revolve around a handful of powerful families, making the transition to broad-based democracy problematic.

"So many things have been broken in this country," says Stephen P. Cohen, a South Asia scholar at the Brookings Institution in Washington. "You wonder if they can fix them."

Mr. Musharraf's departure, at least in the short term, would likely trigger infighting among coalition partners in the current government. Neither of Pakistan's two most powerful politicians are members of Parliament. Ms. Bhutto's widow, Asif Ali Zardari, who leads the Pakistan People's Party, has made it clear to associates that he would be interested in the presidency, should the post become vacant. Mr. Zardari would be a controversial choice. He has faced corruption allegations in the past, but received immunity from prosecution under a so-called "national reconciliation" ordinance that Mr. Musharraf signed late last year.

The politician who stands to gain the most is Nawaz Sharif, head of an anti-Musharraf faction of the Pakistan Muslim League, who returned from exile last year. Although his party is the junior partner in the ruling coalition, he has been Mr. Musharraf's most vocal critic, and is the chief proponent of impeachment.

Mr. Sharif was the prime minister that Mr. Musharraf deposed when he took power in a bloodless coup in 1999. At that time, Mr. Musharraf was seen as the strongman Pakistan needed after a series of civilian governments tainted by incompetence and allegations of corruption.

After the 9/11 attacks, he became the Bush administration's frontline ally in the fight against terrorism. Since then, more than $10 billion in U.S. aid has helped buoy Pakistan's economy, which grew at close to 7% a year for five years in a row, before slowing to 5.8% in the fiscal year that ended June 30.

But economic inequalities have worsened under Mr. Musharraf. As the U.S. pressured the government to crack down on militants in the border region, Islamic extremism took a violent turn in Pakistan's cities. A deadly battle between troops and militants at an Islamabad mosque in July 2007 provoked a wave of suicide bombings against military targets. There was a growing sense that the government was losing control and the military was vulnerable.

In March 2007, Mr. Musharraf sought to oust the chief justice of the Supreme Court, alleging misconduct. It wasn't the first time the court had come under fire. When Mr. Sharif was prime minister, his supporters stormed the Supreme Court as it heard a contempt case against him. The chief justice back then was eventually forced out.

Last year, however, people fought back. The chief justice, Iftikhar Chaudhry, refused to resign. Lawyers and political activists rallied around him, protesting in the streets. Last November, when it appeared that the Supreme Court might rule Mr. Musharraf ineligible to serve another term as president, he declared a state of emergency and dismissed dozens of judges. Although he was re-elected, the moves backfired. Popular opinion turned against him. His standing eroded further when Ms. Bhutto was assassinated on Dec. 27.

The Pakistani government accused a militant leader of masterminding Ms. Bhutto's killing. But many Pakistanis and anti-Musharraf politicians pointed the finger at his government. When national elections were held in February, dozens of his supporters were swept from Parliament. "He and his cronies got the country's alchemy completely wrong," says Ali Cheema, who heads the economics department at the Lahore University of Management Sciences.

After the new coalition government was formed, Mr. Sharif, Mr. Zardari and others held many rounds of talks over how to deal with Mr. Musharraf and how to reinstate the judges he fired.

Authoritarian Streak

In the past, Mr. Sharif has shown his own authoritarian streak. He has had unfriendly journalists jailed. While he helped open Pakistan's economy to foreign investment, he courted the military and religious conservatives for political support. A bill that he supported would have introduced Islamic Sharia law to the criminal-justice system.

Ahsan Iqbal, a spokesman for Mr. Sharif, said the former prime minister had a lot of time to reflect on Pakistan's problems while in exile. "His top priority is to fix the system," said Mr. Iqbal. "We have to redistribute power according to the constitution. We have to have an independent judiciary."

He added that the new coalition government recognizes that a politically minded middle class has changed the political equation. "Whoever is in government," he said, "will have to face a very strong accounting from civil society."

Late Wednesday, in a speech on the eve of Pakistan's independence day, Mr. Musharraf called for reconciliation and political stability. But his overtures were rejected by coalition officials on Thursday. Sherry Rehman, the minister of information, said the government comfortably had the votes in Parliament to impeach him. "There's no turning back from this process," she said.

Write to Peter Wonacott at