SAN’A, Yemen – The departure of Yemen’s battle-wounded president for treatment in Saudi Arabia set off wild street celebrations Sunday in the capital, where crowds danced, sang and slaughtered cows in hopes that this spelled a victorious end to a more than three-month campaign to push their leader from power.

Behind the festive atmosphere, many feared Ali Abdullah Saleh, a masterful political survivor who has held power for nearly 33 years, will yet return — or leave the country in ruins if he can’t.

Hanging in the balance was a country that even before the latest tumult was beset by deep poverty, malnutrition, tribal conflict and violence by an active al-Qaida franchise.

Saleh, who was taken overnight to a military hospital in the Saudi capital, Riyadh, underwent successful surgery on his chest to remove jagged pieces of wood that splintered from a mosque pulpit when his compound was hit by rockets Friday, said medical officials and a Yemeni diplomat.

The stunning rocket attack, which the government first blamed on tribal fighters who in recent weeks turned against the president and later on al-Qaida, killed 11 bodyguards and seriously injured five senior officials worshipping alongside Saleh.

While Saleh is away, Vice President Abed Rabbo Mansour Hadi is acting as temporary head of state, said the deputy information minister, Abdu al-Janadi. The minister said the president would return to assume his duties after his treatment, although experts on Yemeni affairs questioned whether a return is possible in the face of so much opposition.

“Saleh will come back. Saleh is in good health, and he may give up the authority one day but it has to be in a constitutional way,” al-Janadi said. “Calm has returned. Coups have failed. … We are not in Libya, and Saleh is not calling for civil war.”

The Saudis have backed Saleh and cooperated in confronting al-Qaida and other threats, but they are now among those pressing him to give up power as part of a negotiated deal. Saudi Arabia has watched with concern the anti-government protests that have spread to other neighboring countries like Bahrain and is eager to contain the unrest on its doorstep.