Pakistan's voters have resoundingly rejected their president, Mr. Pervez Musharraf. This week's parliamentary elections crushed political parties associated with the president, giving the opposition a significant majority in the legislature and setting the stage for political upheaval. The challenge now is engineering a peaceful transition to a new government and ensuring that it has the strength to bring stability to a long-troubled country.

While there was widespread relief when Mr. Musharraf seized power in 1999 by overthrowing then Prime Minister Nawaz Sharif, his refusal to step down and his efforts to crush institutional opposition to his rule and to his policies alienated many people — even those who once echoed the president's belief that he was Pakistan's savior.

Rising terrorism in Pakistan, the government's heavy-handed response to incidents such as the seizure of the Red Mosque in the summer of 2007, the dismissal last year of the Supreme Court chief justice who had defied the president, and economic mismanagement that has yielded soaring fuel prices, shortages of basic foodstuffs and gas and power cuts have undermined Mr. Musharraf's standing. The assassination of opposition leader Benazir Bhutto two months ago was a final blow.