Yemen's Ali Abdullah Saleh stepped down after 33 years at the helm on Monday, making him the fourth veteran Arab leader to fall in a year of mass pro-democracy demonstrations that have rocked the region.
Standing before a crowd of parliamentarians, tribal leaders and foreign dignitaries at the presidential palace in Sanaa, Saleh formally ceded power to his deputy Abdrabuh Mansur Hadi, pledging to support his efforts to "rebuild" a country still reeling from months of violence.
"I hand over the banner of the revolution, of the republic, of freedom, of security and of stability… to safe hands," said Saleh as he stood beside Hadi and gave a farewell speech carried live on state television.
The main opposition coalition, the Common Forum, which currently heads the interim government, boycotted Monday's ceremony, saying in a statement late on Sunday that Hadi officially became president after winning the 21 February election, not because Saleh handed him the post.
Hadi will serve for an interim two-year period under a Gulf-brokered transition plan signed by Saleh last November after 10 months of protests demanding his ouster.
Saleh said that he would "stand… by my brother the president of the republic," and urged Yemenis to rally behind Hadi in his fight against "terrorism, first and foremost, Al-Qaeda."
"There is no place for terrorism," he said.
Hadi cautioned that the past year of turmoil that has crippled the economy and unleashed nationwide insecurity was not yet over, and appealed to Yemenis to "cooperate with the new leadership" to help the country emerge from the crisis.
He said he hoped that after his two years in office, Yemen could have a peaceful transition.
"I hope we will meet in this room again… to bid farewell and welcome a new leadership. I hope that in two years, I will stand in President Ali Abdullah Saleh's place and a new president will stand in mine," he said.
Presidential and parliamentary elections will be held at the end of Hadi's two-year term.
Saleh is the fourth Arab leader to fall since the beginning of the Arab Spring revolutions that forced the resignation of veteran leaders in Tunisia and Egypt, and led to the gruesome death of Libya's long-time dictator Muammar Qadhafi.
Saleh got the best deal in return for stepping aside: he and his closest aides were granted immunity from prosecution for alleged crimes committed during the brutal crackdown on dissent which left hundreds dead and thousands wounded.
Hadi took the oath of office in parliament on Saturday, and in his first speech as new leader he vowed to fight Al-Qaeda and restore security across the Arab world's poorest nation.
"It is a patriotic and religious duty to continue the battle against Al-Qaeda. If we don't restore security, the only outcome will be chaos," Hadi said.
His taking the oath was overshadowed by a suicide bomb attack at a presidential palace in the southeastern Hadramawt province, killing 26 elite troops in an attack military officials said bore the hallmark of Al-Qaeda.
Yemen's local Al-Qaeda branch, the self-proclaimed Partisans of Sharia, has exploited the decline in central government control that accompanied the anti-Saleh protests that eventually forced him to cede power.
During the unrest, the militants seized large swathes of southern and eastern Yemen.
On Tuesday, Hadi received 99.8 percent of the votes in a presidential election with a 60 percent turnout. He was the sole candidate.
Hadi now faces monumental security, humanitarian and economic challenges that if not resolved, could threaten to derail the political settlement.
The UN's Yemen envoy and key player in the power-transfer deal, Jamal Benomar, has described the political transition as the "beginning of a difficult and thorny road," warning that the country still faces "many dangers."
Yemen's most powerful military units, which were responsible for much of the violence in recent months, remain under the control of Saleh relatives, including his son and nephew.
In the south, separatists are demanding autonomy or independence and on election day attacked polling stations, barring many thousands from casting their ballots.
And in the north, a Shia Zaidi rebellion has refused to subside, despite several wars with the central government in recent years.