Following months of turmoil, a new prime minister took office in Yemen on Sunday, and a transitional government has promised to hold elections in February. That represents new hope for another Mideast nation that has long been controlled by a dictator.

If opposition forces can work together to produce a peaceful transition, and if former dictator Ali Abdullah Saleh can be restrained from meddling, Yemen has a chance to experience real democracy.

But obstacles to peace remain. A major faction of the armed forces is commanded by Mr. Saleh's son, and another faction is headed by a relative who turned against the former ruler. So the potential exists for civil war.

Meanwhile, Al-Qaida is seeking to expand its influence in the countryside and a rebellion has been rekindled in the north. Younger Yemenis who have led 10 months of protests are demonstrating against the agreement because it offers Saleh immunity from prosecution from crimes against the Yemeni people.

Nevertheless, the power transfer has been widely hailed. Saudi Arabia's King Abdullah bin Abdulaziz, said it "marks a new page of Yemeni history." His optimism was shared by President Barack Obama, who called it "a significant step" toward a new era for Yemen. The regime change also won praise from European Union foreign policy chief Catherine Ashton, the foreign ministers of Canada and China and U.N. Secretary General Ban Ki-Moon.

If fulfilled, it would mark the success of yet another popular Arab uprising against dictatorships, the fourth this year.

The secretary general called on the followers of Mr. Saleh and the opposition to honor the agreement by "immediately ceasing all violent acts, refraining from any further provocations and working towards a fully inclusive transition process."

But a day after Mr. Saleh signed the agreement, pro-Saleh gunmen fired on peaceful protestors killing five. Giving added weight to the demand that the ex-dictator be tried for crimes committed by government forces, Human Rights Watch on Friday issued a report on indiscriminate government shelling during a protest in the city of Taizz on Nov. 11 that killed 35 civilians.

Even if the transition to a new government is successful early next year, Yemen is in for a period of instability, at best. The United States should be ready to help the new government gain its footing throughout the transition period.