TUNIS, Tunisia (AP) - Protesters enraged over soaring unemployment and corruption drove Tunisian President Zine El Abidine Ben Ali from power Friday after 23 years of iron-fisted rule, an unprecedented popular uprising in a region dominated by strongmen who do not answer to their people.
Tunisians buoyant over Ben Ali's ouster immediately worried, however, about what's next: the caretaker leadership of the prime minister who took control, and the role of the army in the transition.
The upheaval took place after weeks of escalating unrest fueled partly by social media and cell phones, as thousands of demonstrators from all walks of life rejected Ben Ali's promises of change and mobbed the capital of Tunis to demand his ouster in the country's largest demonstrations in generations.
At least 23 people have been killed in the riots, according to the government, but opposition members put the death toll at more than three times that.
On Friday, police repeatedly clashed with protesters, some of whom climbed onto the entrance roof of the dreaded Interior Ministry, widely believed for years to be a place where the regime's opponents were tortured.
With clouds of tear gas and black smoke drifting over the city's whitewashed buildings, Prime Minister Mohammed Ghannouchi went on state television to announce that he was assuming power in this North African nation previously known mostly for its wide sandy beaches and ancient ruins.
"I take over the responsibilities temporarily of the leadership of the country at this difficult time to help restore security," Ghannouchi said in a solemn statement on state television. "I promise ... to respect the constitution, to work on reforming economic and social issues with care and to consult with all sides."
The president promised legislative elections in six months, a pledge that appeared to open at least the possibility of a new government.
President Barack Obama said he applauded the courage and dignity of protesting Tunisians, and urged all parties to keep calm and avoid violence.
Tunisian air space was closed and the president's whereabouts were a mystery. It was far from certain that his ouster would calm the streets. Isolated gunfire broke out sporadically Friday night and a state of emergency was in effect. European tour companies moved thousands of tourists out of the country.
"My first reaction is relief," said Dr. Souha Naija, a resident radiologist at Charles Nicole Hospital. "He's gone ... I finally feel free."
"They got the message. The people don't want a dictator." However, she voiced concern for the future because, officially at least, Ben Ali vacated power only temporarily.
"It's ambiguous," she said.
Ben Ali's downfall sent a potentially frightening message to autocratic leaders across the Arab world. He deftly managed the economy of his small country of 10 million better than many other Middle Eastern nations grappling with sclerotic economies and booming, young populations, turning it into a beach haven for tourists and beacon of stability in volatile North Africa. There was a lack of civil rights and little or no freedom of speech, but a better quality of life for many than in neighboring countries like Algeria and Libya.
He had won frequent praise from abroad for presiding over reforms to make the economy more competitive and attract business; growth last year was at 3.1 percent.
But unemployment was officially measured at 14 percent, but far higher among the young - 52 percent of Tunisia's 10 million people - and despair among job-seeking young graduates was palpable.
Arabs across the region celebrated on Twitter, Facebook and blogs at news of the Tunisian uprising.
Thousands of Tweets congratulating the Tunisian people flooded the Internet and many people changed their profile pictures to Tunisian flags.
Egyptian activists opposed to President Hosni Mubarak's three-decade regime also looked to the events in Tunisia with hope.
About 50 Egyptians gathered outside the Tunisian embassy in Cairo Friday to celebrate with singing and dancing. They chanted, "Ben Ali, tell Mubarak a plane is waiting for him too!"
Unconfirmed rumors about Ben Ali's location reached such a fevered pitch that the governments of France and Malta - just two of several countries where Ben Ali was speculated to be heading - put out statements saying they have had no requests to accommodate him
The 74-year-old leader came to power in a bloodless palace coup in 1987. He took over from a man called formally President-for-Life - Habib Bourguiba, the founder of modern-day Tunisia who set the Muslim country on a pro-Western course after independence from France in 1956.
Ben Ali removed Bourguiba from office for "incompetence," saying he had become too old, senile and sick to rule. Ben Ali promised then that his leadership would "open the horizons to a truly democratic and evolved political life."
But after a brief period of reforms, Tunisia's political evolution stopped.
Ben Ali consistently won elections with overwhelmingly questionable tallies: In 2009, he was re-elected for a fifth five-year term with 89 percent of the vote. Beforehand, he had warned opponents they would face legal retaliation if they questioned the vote's fairness.
U.S. diplomatic cables released by WikiLeaks have called Tunisia a "police state" and described the corruption there, saying Ben Ali had lost touch with his people. Social networks like Facebook helped spread the comments to the delight of ordinary Tunisians, who have complained about the same issues for years.
Under Ben Ali, most opposition parties were illegal. Amnesty International said authorities infiltrated human rights groups and harassed dissenters. Reporters Without Borders described Ben Ali as a "press predator" who controlled the media.
The riots started after an educated but jobless 26-year-old committed suicide in mid-December when police confiscated the fruits and vegetables he was selling without a permit. His desperate act hit a nerve, sparked copycat suicides and focused generalized anger against the regime into a widespread, outright revolt.
The president tried vainly to hold onto power. On Thursday night he went on television to promise not to run for re-election in 2014 and slashed prices on key foods such as sugar, bread and milk. A day later he declared the state of emergency, dissolving the government and promising new legislative elections within six months.
Hundreds of police with shields and riot gear moved into the peaceful demonstration nearly six hours after it began on the capital's main Friday in front of the Interior Ministry. Helmeted police fired dozens of rounds of tear gas and kicked and clubbed unarmed protesters - one of whom cowered on the ground, covering his face.
An AP Television News reporter heard gunfire in the center of the Tunisian capital late Friday afternoon, in addition to the popping of tear gas pistols.
A few youths were spotted throwing stones, but most demonstrated calmly. Protesters were of all ages and from all walks of life, from students holding mid-street sit-ins to doctors in white coats to black-robed lawyers waving posters.
"A month ago, we didn't believe this uprising was possible," said Beya Mannai, a geology professor at the University of Tunis. "But the people rose up."
The prime minister suggested that Ben Ali had willingly handed over control,but the exact circumstances of his removal from power were unclear.
The prime minister did not say anything about a coup or about the army being in charge, saying only that he was taking over while the president is "temporarily indisposed."
"Under Article 56 of the Constitution that holds that in a case of temporary incapacity, the president can delegate by decree his power to the prime minister. Given the temporary incapacity of the President to carry out his duties, I take over the responsibilities temporarily of the leadership of the country at this difficult time to help restore security," Ghannouchi said.
Ghannouchi, 69, is a trained economist who has been a longtime close ally of Ben Ali. Prime minister since 1999, he is one of the best-known faces of Tunisia's government. He also has served as the country's minister for international cooperation and its minister of foreign investment.
A founder of the main legal opposition party said the dramatic developments do not amount to a coup d'etat.
"It's an unannounced resignation," Nejib Chebbi said by telephone. To declare a permanent absence of a head of state, such as in a coup, elections would have to be held within 60 days, he said. "So they declare a temporary vacating of power."
Tour operator Thomas Cook said it was evacuating 3,800 British, Irish and German vacationers from Tunisia as a precaution.
In Sudan in 1985, a collapsing economy and other grievances sparked a popular uprising, although the government was eventually ousted by a military coup.
However, the closest parallel in the broader Middle East comes from Iran - which is not an Arab nation - where mass demonstrations helped topple the Shah and usher in the establishment of the Islamic Republic in 1979.
Tunisia's giant neighbor Algeria saw huge protests before it was shaken by a military coup in 1992, with a five-man leadership put in place after the army canceled the nation's first multiparty legislative elections that a Muslim fundamentalist party was poised to win. The party, the Islamic Salvation Front, became a vehicle for popular dissent.
There were also massive demonstrations in Lebanon in 2005, dubbed the "Cedar Revolution," but those were directed against Syrian influence in the country and not the Lebanese government per se. The protests led to the withdrawal of Syrian forces from Lebanon and the resignation of Lebanon's pro-Syrian prime minister and fresh elections.
Al-Qaida's North African offshoot appeared to try to capitalize on the Tunisian unrest, offering its support for protesters this week. There has been no sign of Islamic extremist involvement in the rioting.
Nicolas Garriga and Oleg Cetinic in Tunis, Angela Doland, Greg Keller and Jamey Keaten in Paris and Hadeel Al-Shalchi in Cairo contributed to this report.