The end of Mr. Abdurraham Wahid's term was perfectly in keeping with the 21 months that he spent in office. It was confused, if not surreal. Indonesians, and their friends, are hoping that the new president, Ms. Megawati Sukarnoputri, can end the confusion. Under the best of circumstances, that is a lot to ask. But Indonesia, the world's fourth most populous country and the anchor of Southeast Asia, has been unstable for too long. For now, Ms. Megawati is the country's best bet for stability.

The impeachment of Mr. Wahid marked the inglorious end of the political career of a respected and heroic man. He was a principled opponent of the Suharto regime, who stood for a humane and tolerant brand of Islam. He proved to be a wily politician; his maneuvers denied Ms. Megawati the presidency even though she was the most popular Indonesian politician in the election that was held two years ago. Once he took office, however, Mr. Wahid began to act erratically.

Some blamed his medical condition. Mr. Wahid has had two strokes and is nearly blind. As his opponents grew more frustrated, Mr. Wahid acted even stranger. His government's inability to combat the country's economic crisis and various secession movements, when combined with scandals lapping at the president's door, gave the opposition grounds to impeach the president. Mr. Wahid responded with bluster and attempts to share power to mollify his critics. Neither tactic worked. After he was impeached, Mr. Wahid attempted one last time to declare an emergency, but the armed forces ignored him. He holed up in the president's residence until he agreed to go to the United States for medical reasons, and another crisis was averted.