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 cannot. 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-Qaeda franchise with international reach.

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

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

While Saleh is away, Vice President Abed Rabbo Mansour Hadi is acting as temporary head of state, said Abdu al-Janadi, deputy information minister. Janadi said the president would return to assume his duties after his treatment, though 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," Janadi said. "Calm has returned. Coups have failed. . . . We are not in Libya, and Saleh is not calling for civil war."

His sudden departure raised many questions, including whether his Saudi hosts want him to return. The Saudis have backed Saleh and cooperated in confronting al-Qaeda 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 antigovernment protests that have spread to Bahrain and other neighboring countries and is eager to contain the unrest on its doorstep.

An opposition party official said Sunday that international mediators, including the United States and Saudi Arabia, tried to get Saleh to sign a presidential decree passing power to his vice president before he left for Saudi Arabia - a strong indication that they are trying to push Saleh from power permanently.

Saleh refused to sign the declaration, offering only a verbal agreement, but the negotiations delayed his departure, the official said.

On Sunday in the streets of the capital, San'a, crowds celebrated what they hoped would be Saleh's permanent exit.

People danced, sang, and slaughtered a few cows in what demonstrators have dubbed Change Square, the epicenter of the nationwide protest movement since mid-February calling for Saleh to step down immediately.

Some uniformed soldiers joined in and were hoisted on the shoulders of the crowd. Many people waved Yemeni flags, joyfully whistling and flashing the "V" for victory.

"Who would have believed that the people could have removed the tyrant?" said Moufid al-Mutairi, 30, a teacher.

Women in black veils joined demonstrators carrying banners that hailed Saleh's departure. One read: "The oppressor is gone, but the people stay."