Over the past seven years, Algeria's north African neighbours have watched fearfully as more than 100,000 people were slaughtered on the other side of their borders. They responded differently, Tunisia by crushing its Islamist movement, Morocco by modest political reform.
In a post-doctoral thesis on State and Society in the Maghreb, 1987-1997, Dr Bruno Callies de Salies, a reserve commandant in the French army and a professor at the Saint-Cyr military academy, has examined the roots of instability in the region.
Dr Callies de Salies defended the thesis before a panel of experts on north Africa yesterday at the University of Lille. "The population of the Maghreb has tripled in the four decades since independence," he said. Because the countryside could not sustain large numbers, north Africans moved en masse to the cities. Governments failed to provide adequate housing, schools, jobs and medical care.
In the 1970s left-wing opposition groups fed on popular dissatisfaction. Libya, Tunisia, Algeria and Morocco all encouraged fledgling Islamist movements in the hope of weakening the leftists. When the Islamists flourished, all initially tried to co-opt fundamentalism by appointing pro-government councils of ulemas (theologians) and official muftis.
Only Tunisia departed from the "more Catholic than the Pope" approach. In the 1980s the police chief, Mr Zine El Abidine Ben Ali, was promoted to interior minister after his success at suppressing demonstrations. In November 1987 Mr Ben Ali staged a "constitutional coup" against the ageing president, Mr Habib Bourguiba. The new leader freed prisoners, exiles returned from abroad and the mood was optimistic, according to Dr Callies de Salies.
Then Iraq invaded Kuwait in August 1990. North African fundamentalists criticised their own governments for supporting the pro-western, anti-Iraqi Arab coalition. Mr Rashid Ghanoushi, leader of the Tunisian Islamist movement, Ennahda, fled to Algeria and then to Britain. President Ben Ali jailed more than 10,000 fundamentalists. After cutting Islamists out of Tunisian politics, he then attacked them in the educational system.
New textbooks were written and Islamist teachers were replaced with secularists. Exterior signs of Islamic feeling, such as headscarves for women or men wearing beards, became a rare sight in Tunisia.
In 1993-94, Mr Ben Ali turned on those who denounced his repressive excesses, chiefly the Tunisian Human Rights League.
More recently he has imprisoned members of the tame opposition who protested when he rigged elections. During Mr Ben Ali's 11 years in power, the number of police has quadrupled. His Tunisia is a relatively prosperous, if paranoid and joyless country.
King Hassan II of Morocco, Dr Callies de Salies said, has emphasised his own role as a descendant of the Prophet Mohammed and "Commander of the Faithful". He built the world's largest mosque and set up a theology faculty whose graduates become religious advisers to the government. Fundamentalists none the less rioted in Fez in December 1990, and the Moroccan mokhabarat (secret police) has not been able to prevent clashes between Islamist and secular students
Morocco has an advantage in that it is a 1,000-year nation-state with a strong identity. "Fez had a university when Paris was still a village," Dr Callies de Salies said. "And the French colonisation of Morocco and Tunisia was relatively weak, unlike Algeria, where it broke down the structure of society." But the rural exodus undermined the Moroccan monarchy's power base, a feudal network of family alliances.
In the 1990s King Hassan II realised he had to give some power to the city-dwelling middle classes if the monarchy was to survive and if Morocco was to become a modern country. This small opening resulted in the appointment this year of a long-time opponent and former political prisoner, Mr Abderrahmane Youssoufi (74), as prime minister.
But the king's men - in particular the Minister of the Interior, Mr Driss Basri - continue to keep a tight grip on the country, even if Morocco has improved its human rights record by closing the infamous Tazmamart prison and acknowledging the deaths in custody of 56 "disappeared" people.
At 68, King Hassan's health is fragile, and his son, Prince Sidi Mohamed, has shown little interest in power. "I will make reforms," King Hassan has said. "Things will evolve, but parliamentary monarchy will be for my son's reign, not mine."
Europeans prefer dictatorship to the bloodshed and chaos that continue in Algeria. Through diplomatic pressure, the Europeans have occasionally obtained the liberation of political prisoners in Tunisia and Morocco. The ultimate question, which Dr Callies de Salies does not answer, is whether those authoritarian models will survive, or merely delay an inevitable explosion.