A few days after the Algerian generals cancelled the country's first - and last - democratic elections in January 1992, I went to what was known as the Kabul Mosque, in the Belcourt district of Algiers.
Hundreds of bearded men wearing baggy Afghan trousers, round pakol hats and khol eyeliner [allegedly a habit of the Prophet Mohammed] flocked to Friday prayers. Some had fought with the "mujahedin" against the Soviets before attempting their own Islamic revolution. The majority never left the slums of Algiers, but imitated their heroes' dress and rhetoric.
These Algerian Afghans subsequently murdered dozens of Westerners. Most of the rebels perished in the past decade, in a war with security forces that has claimed more than 150,000 lives. Some have taken refuge in the mountains of Algeria.
Some probably died in last week's prison massacre at Gala-e-Jingo. A few may be hiding with Osama bin Laden in Torn Born or Kandahar. Today, Algiers is poor, exhausted, but largely pacified, its ubiquitous unfinished buildings a metaphor for the country's abandoned democratisation. Graffiti praising bin Laden is quickly painted over, and the denizens of Cab El-Sued who greeted foreign reporters travelling with President Jacques Chirac were no longer hostile.
Ironically, the attacks of September 11th have given the generals - and President Zine El Abidine Ben Ali's police state in neighbouring Tunisia - the recognition and legitimacy they yearned for through the 1990s.
"The only positive thing about September 11th was that it opened the eyes of Europe and the US," says Miloud Brahimi, a prominent Algiers lawyer. "We're not happy that such a monstrous thing happened, but Algeria had been ringing alarm bells for years." In Tunis, the tone is even more triumphant. "The Western World had diverted its gaze. . . under the pretence of defending human rights and democracy," the official newspaper La Presse said on the day Mr Chirac called on Mr Ben Ali. The same editorial, praising Ben Ali's "realistic, objective as well as visionary analysis" was broadcast in English, French and Arabic on Tunisian radio.
Both countries were until recently embarrassments to Paris, the former colonial power and still the main source of imports and foreign aid. In both capitals, Mr Chirac praised his hosts' "struggle against terrorism" and announced France was stepping up co-operation - especially in intelligence matters.
Le Figaro denounced the "sitting room democrats" who attacked Mr Ben Ali, and lamented that Arab states "were prevented from entering modernity by the fundamentalist threat". Le Figaro conveniently forgot that Mr Ben Ali started arresting Islamists in the early 1990s, then moved on to human rights workers and secular opposition.
Mr Chirac often warns the West against equating Islam with terrorism. But by giving carte blanche to North African regimes in their domestic troubles he seems to equate terrorism with political opposition. No one could approve the atrocities committed by the Algerian Armed Islamic Group, whose leaders were Afghan veterans.
But what about the millions of Algerians who were cheated of the right to vote in 1992? What recourse is left to those living under corrupt, unjust regimes? In April Gen Khaled Nezzar, the former Algerian defence minister, fled France after three Algerians filed a lawsuit against him for torture. In November six Tunisians filed a similar suit against the head of security at the Interior Ministry, Ali Ganzaoui, and the intelligence chiefs Fraj Gdoura and Mohamed Ennaceur.
But following September 11th, these men apparently feel safe in Europe. Gen Nezzar says he'll "confront the lies" in a Paris courtroom next February. The Tunisians, says the human rights lawyer William Bourdon, take the precaution of travelling on phoney passports. According to Amnesty International, Mr Ben Ali has locked up 1,000 political prisoners. His is considered a "gentle dictatorship", since Tunisia tortures but usually refrains from killing political opponents.
Those jailed in the past two years include lycΘe students who tried to demonstrate and a lawyer who defended Islamist sympathisers. Mr Ben Ali has been "elected" three times with over 99 per cent of the vote. And he is now rewriting the constitution to ensure himself another term until 2011.
Tunisia was the first North African country to sign an agreement of association with the EU, in 1995. Algeria is expected to sign one before the end of the year. The free trade agreements contain a clause about respecting human rights, but in Tunisia's case it's been forgotten because the country is successfully liberalising its economy. Tunisians are allowed to enjoy prosperity, but not freedom. President Chirac praised the country's "surprising economic and social success in the past 14 years under President Ben Ali". There were few such examples among developing countries, he noted. "Modern consumer goods - small cars, computers, houses - are more and more accessible to the vast majority of people."
Algerians have neither prosperity nor democracy. Up to 10,000 people are missing, and Amnesty says it has proof that 4,000 of them were kidnapped by the authorities. More than 100 people were killed and another 8,000 wounded when the gendarmerie suppressed riots in Kabylie last summer.
The government finally recognised Tamazight, the language of the Kabyle Berbers - too late. Tribal councils known as aβrouch now rule the main Kabyle towns of Tizi Ouzou, Bejaia and Bouira, where gendarmes no longer venture. For the first time in a decade of civil strife, Algeria's territorial integrity is in danger.
After three years of drought, agrarian Morocco is sinking deeper into poverty. "His majesty"King Mohamed VI and the Youssoufi government have disappointed the high hopes they inspired.
By some estimates, illiteracy is as high as 60 per cent. Anti-American feeling runs high throughout the Arab world, but tolerant, relatively democratic Morocco is the only North African country where it's been expressed recently.
Official Morocco held an ecumenical service for the victims of September 11th in Rabat's Saint-Pierre Cathedral.
A group of ulemas [Muslim clergy] not recognised by the palace issued a fatwa warning the government against joining Mr Bush's coalition. Moroccan authorities twice banned marches called by Islamists to protest against American strikes on Afghanistan.
A just settlement for the Palestinians would deflate fundamentalist movements and anti-Americanism in North Africa. In the meantime, Europe needs to pay more attention to the 70 million Tunisians, Algerians and Moroccans on its southern shores. The Algerian lawyer, Miloud Brahimi, says he wants the West "to support the perennality of the Algerian state against terrorism" - not necessarily the inept, military-backed government. He believes that interaction with European democracy will eventually improve Algeria. I heard a similar argument in Tunisia; that France, by providing a refuge for Tunisian opposition leaders when they are released from prison or house arrest, undermines dictatorship there. Perhaps. But unconditional support for the "exemplary struggle against terrorism" comforts torturers and jailers.
Nor have Western "democrats" provided a shining example in the wake of September 11th. "How dare you preach to us after [the prison massacre by the Northern Alliance with US air support at] Qala-e-Jhangi?" a Tunisian official asked a member of the French President's entourage.
When Mr Chirac visited Egypt three weeks ago, President Hosni Mubarak held a background briefing for Arab newspaper editors.
"We lost a president [Anwar Sadat] and I survived two assassination attempts by fundamentalists," Mr Mubarak complained. "For 20 years we've been lectured about human rights, but look at the Americans now. They've arrested 1,000 people since the World Trade Centre; they won't even tell us the names of the Egyptians. They're searching houses and setting up military tribunals - the things they always criticised us for."
Lara Marlowe is Paris Correspondent for The Irish Times