SANAA/RIYADH Yemeni President Ali Abdullah Saleh, wounded in an attack on his palace, underwent surgery in Saudi Arabia and Yemenis seeking his overthrow celebrated what they hoped was the end of his 33-year rule.
A Yemeni ruling party official said Saleh would return to the country within days, but with a power struggle already under way and gunfights raging in parts of the country, the threat of further turmoil remained high.
A medical source in Saudi Arabia told Reuters Saleh was awake and in good condition after undergoing surgery Sunday to remove shrapnel from his chest.
"People are worried about what will happen after Saleh's departure. They're most worried about a military coup or struggles for power within the army," said Farouq Abdel Salam, a resident of the southern port city of Aden.
Concerns are mounting that Yemen, already on the brink of financial ruin and home to al Qaeda militants, could become a failed state posing a threat to the world's top oil-exporting region and global security.
Saleh has exasperated former U.S. and Saudi allies, who once saw him as a key partner in combating Yemen-based al Qaeda in the Arabian Peninsula, by repeatedly reneging on a Gulf-brokered deal under which he would quit in return for immunity.
Leaving Yemen could make it hard for him to retain power.
"I think this is the end of Saleh's reign," said Ghanem Nuseibeh, founder of Cornerstone Global Associates and senior analyst at Political Capital.
"There is a short window of opportunity for Saudi, the Gulf Cooperation Council and the West to salvage whatever they can in Yemen, and they need to act fast. We are entering a post-Saleh Yemen, which Saudi Arabia and the West may not be necessarily prepared for."
Tens of thousands gathered for songs and dances in a Sanaa square and cattle were roasted in a massive street party to celebrate what many saw as Saleh's permanent departure from Yemen, the Arab world's poorest country.
Protesters held signs reading: "Yemen is more beautiful without you," and "Name: A free Yemeni. Date of Birth: June 4, 2011. Place of birth: Change Square." Demonstrators have dubbed the protest zone outside Sanaa University "Change Square."
"Our happiness will be complete once we're sure that Saleh won't come back," one resident said.
But gunfire rang out in another part of the capital, serving as a reminder of the past two weeks of fighting between Saleh's forces and the Hashed tribe led by Sadeq al-Ahmar.
That fighting, which killed more 200 people, was the bloodiest since protests broke out in January, inspired by revolts in Tunisia and Egypt.
In the southern city of Taiz, thousands of people celebrated Saleh's departure with a fireworks display, but Al Jazeera reported several people were wounded in heavy gunfire.
The world's largest oil exporter, Saudi Arabia, which shares a 1,500-km (950-mile) border with Yemen, has led efforts to negotiate a peaceful handover to fractious opposition groups.
But the true seat of power, following Saleh's departure, has yet to be decided. Saleh's eldest son Ahmed commands the elite Republican Guard and three of his nephews control the country's security and intelligence units.
Saleh has, however, lost the support of powerful general Ali Mohsen, who has sided with protesters and called the president a "madman."
Washington has called on Saleh to quit and the White House said Barack Obama's top counter-terrorism aide spoke Saturday to the Yemeni vice president, who is the acting leader.
Acting President Abd-Rabbu Mansour Hadi, seen by analysts as having little power, met military commanders, including Saleh's sons and nephews and the U.S. ambassador.
He extended an olive branch to the powerful Hashed tribal federation and called for a ceasefire which was accepted by tribal leader Sadeq al-Ahmar, opposition leaders said.
The attack on Saleh's palace killed seven and shook the whole government. The prime minister, two deputy prime ministers and the speakers of both parliamentary chambers are also being treated for injuries in Saudi Arabia.
Yemen's military blamed al Qaeda for the attack, but diplomats and analysts have accused the Saleh government of exaggerating the al Qaeda threat in Yemen to win global support.
"Saleh leaving the country at this time carries heavy political symbolism," said Eurasia Group analyst James Fallon. "This will be read by many circles in Yemen as the end of Saleh's presidency."
(Additional reporting by Khaled al-Mahdi in Sanaa, Mohammed Mukhashaf in Aden, Samia Nakhoul in London; writing by Amran Abocar and Jon Herskovitz; editing by Andrew Roche)