PARIS - Of the many Western governments surprised by the ouster of Tunisian President Zine al-Abidine Ben Ali, none has been more wrong-footed than France, the self-styled guardian of North Africa's Maghreb region.
The so-called "Jasmine Revolution," after the yellow flower that grows profusely in Tunisia, has exposed disastrous miscalculations about the Ben Ali regime.
For decades, France courted and supported Ben Ali, seeing in him a bulwark against Islamists and declaring him a leader determined to modernise his country through education and rights for women.
But in less than a month, the 74-year-old President, his 23-year regime and his kleptocratic family were swept away by anger at rising food prices, cronyism, corruption and repression.
"The French Government badly underestimated the depth of popular feeling and made a major error of judgment by sticking too long to the idea of helping Ben Ali stay in power," said Jacques Lanxade, ambassador to Tunisia under former President Jacques Chirac.
Just as the United States blithely believed in the survival of the Shah in the 1979 Iranian Revolution, France had faith in Ben Ali up to the very end.
Even in the final days, ministers rubbished those who described the regime as a dictatorship and characterised Tunisia's problems as economic rather than political.
Speaking in the National Assembly three days before Ben Ali fled, Foreign Minister Michele Alliot-Marie said Tunisia was facing "wide-ranging social disorder".
Alliot-Marie offered France's "security expertise ... so that the right to demonstrate can be upheld at the same time as ensuring security". France, and Europe, would also boost economic aid.
After Ben Ali and his family abruptly flew to Saudi Arabia last Friday, the Elysee presidential palace held a crisis meeting to try to figure out the mess.
It released a statement whose brevity was eloquent, saying that it "noted" the transition, called for dialogue and pledged "France stands alongside the Tunisian people in this decisive time".
Press commentators and analysts point to several reasons for the debacle.
One is the cosy relations between successive French presidents and Ben Ali and the "group think" of politicians and media in believing Tunisia's image of modernity.
"For more than two decades, Jacques Chirac, then Nicolas Sarkozy, but also, let's be frank, part of the French left, deliberately closed their eyes when it came to a regime to which they paid tribute to its economic success and secularism," said Le Monde.
"[They] refused to countenance the barely-disguised grab on the country's economy by a family clan, the mafia-like practices at the highest level, the social chasm that today is now obvious and the crackdown on any protest, especially on the web.
"All the people who embraced this flimsy regime under a moronic policy of pragmatism should now explain why they thought it was a solid bulwark against the Islamists when it has now collapsed like a house of cards," said the leftwing daily Liberation.
A French diplomatic source said much of this criticism was inaccurate and unfair.
"If France had criticised Tunisian policy, the same press which today is expressing its outrage [at Ben Ali] would have accused us of interference and neo-colonialism."
In the past 20 years, voters in Algeria, the Israeli-occupied Gaza Strip and in Turkey have preferred Islamist or Islamist-rooted parties, provoking a scare in the West.
The revolution in Tunisia will be felt acutely in Algeria, Morocco and Egypt.
All three countries have similar economic and social problems, and ageing authoritarian regimes supported by the West in the strategy of fighting terrorism.