SANAA — Yemen's autocratic leader agreed Wednesday to step down after months of demonstrations against his 33-year rule, pleasing the U.S. and its Gulf allies who feared that collapsing security in the impoverished nation was allowing an active al-Qaida franchise to step up operations.
President Ali Abdullah Saleh is the fourth leader to lose power in the wave of Arab Spring uprisings this year, following longtime dictators in Tunisia, Egypt and Libya.
But the deal ushering Saleh from power grants him immunity from prosecution and doesn't explicitly ban him from the country's political life - raising doubts that it will address Yemen's many problems.
The deal opens the way to what will likely be a messy power struggle. Among those possibly vying for power are Saleh's son and nephew, who command the country's best-equipped military units; powerful tribal leaders; and the commander of a renegade battalion.
Saleh had stubbornly clung to power despite nearly 10 months of huge street protests in which hundreds of people were killed by his security forces. At one point, Saleh's palace mosque was bombed and he was treated in Saudi Arabia for severe burns. When he finally signed the agreement to step down, he did so in the Saudi capital of Riyadh after most of his allies had abandoned him and joined the opposition.
Seated beside Saudi King Abdullah and dressed smartly in a dark business suit with a matching striped tie and handkerchief, Saleh smiled as he signed the U.S.-backed deal hammered out by his powerful Gulf Arab neighbors to transfer power within 30 days to his vice president, Abed Rabbo Mansour Hadi. He then clapped his hands a few times.
"The signature is not what is important," Saleh said after signing the agreement. "What is important is good intentions and dedication to serious, loyal work at true participation to rebuild what has been destroyed by the crisis during the last 10 months."
Saleh had agreed to sign the deal three times before, only to back away at the last minute.
The power transfer will be followed by presidential elections within 90 days. A national unity government will them oversee a two-year transitional period.
The deal falls far short of the demands of the tens of thousands of protesters who have doggedly called for democratic reforms in public squares across Yemen since January, sometimes facing lethal crackdowns by Saleh's forces.
Protesters camped out in the capital of Sanaa immediately rejected the deal, chanting, "No immunity for the killer!" They vowed to continue their protests.
President Barack Obama welcomed the decision, saying the U.S. would stand by the Yemeni people "as they embark on this historic transition."
King Abdullah also praised Saleh, telling Yemenis the plan would "open a new page in your history" and lead to greater freedom and prosperity.
Saleh, believed to be in his late 60s, addressed members of the Saudi royal family and international diplomats at the signing ceremony, portraying himself as a victim who sought to preserve security and democracy but was forced out by power-hungry forces serving a "foreign agenda."
After the bombing in June, Saleh spent more than three months in Saudi Arabia for treatment, returning to Yemen unannounced and resuming his rule.
As Saleh funneled more resources to cracking down on protesters, security collapsed across the country. Armed tribesmen regularly battle security forces in areas north and south of the capital, and al-Qaida-linked militants took over entire towns in southern Yemen.
Saleh often used the fear of terrorism to shore up support for his rule, even striking deals with militants and using their fighters to suppress his enemies while raking in millions of dollars from the United States to combat the branch of al-Qaida that he let take root in his country.
The U.S. saw little choice but to partner with him, and Washington stepped up aid to Saleh to fight Al-Qaida in the Arabian Peninsula. That group, believed to be the terrorist group's most active branch, has been linked to plots inside the U.S.
The would-be bomber who tried to blow up a Detroit-bound plane on Christmas 2009 was in Yemen earlier that year. The Pakistani-American man who pleaded guilty to the May 2010 Times Square car bombing attempt was inspired by Internet postings by Anwar al-Awlaki, a Yemeni-American cleric who sought refuge in Yemen and was killed in a U.S. drone strike on Sept. 30. U.S. Maj. Nidal Malik Hasan, charged with killing 13 people in the Nov. 5, 2009, rampage at Fort Hood, also exchanged e-mails with al-Awlaki.
Even before the uprising began, Yemen was the poorest country in the Middle East, fractured and unstable with a government that had weak authority at best outside the capital.
For months, the U.S. and other world powers pressured Saleh to agree to the power transfer proposal by the Gulf Cooperation Council. He agreed, but then backed down before signing the deal.
The deal alone is unlikely to end the uprising or address Yemen's deeply rooted problems.
"He did sign, but I don't think this is the end of the crisis in Yemen," said Yemen expert Gregory Johnsen of Princeton University.
The deal doesn't address powerful members of Saleh's immediate family, including his son who heads the elite Republican Guard. His relatives could continue to act as proxies for Saleh inside the government.