While the region's documented history reaches far back into the Neolithic period, the modern state of Algeria is a relatively recent creation, a name coined by the Ottoman Turks in the 16th century for the territory controlled by the regency of Algiers, then a Turkish colony.

The Barbary Coast

By the late 1600s, Algeria was a military republic, ruled by locally appointed officers, with Istanbul-anointed pashas (governors) retaining only a symbolic role. Coffers brimmed with the proceeds of piracy, and although assignation was the favoured form of regime change, this was a period of stability.

The country was, of course, better known to Europeans as the Barbary (a corruption of Berber) Coast, an anarchic place where fearsome pirates preyed on Christian – and in particular, Catholic – shipping. Mediterranean piracy took off during the Holy Wars, and a few centuries later it had become the mainstay of North Africa’s economy. Khayr al-Din, also known as Barbarossa, the first regent of Algiers, at one point held no fewer than 25,000 Christians captive in the city. Algiers drew a steady flow of Protestant English and Dutch privateers and adventurers, who often ‘took the turban’, converting to Islam while amassing great fortunes.

The power vacuums created by the French Revolution and Napoleonic Wars gave the pirate trade a lucrative second wind, and Algerian attacks on US shipping led to the two Barbary Wars, and the eventual defeat of the Algerian fleet off Algiers in 1815.

French Rule

France’s second, and greatest, colonial empire was ostensibly spawned by a diplomatic crisis, involving unpaid French debts, a slap-happy dey (Ottoman governor) and a slighted French consul. In truth, France’s economic troubles played a large part, as well as it being an act of desperate popularism by the failing Bourbon monarch Charles X. A naval blockade became an invasion in 1830, Algiers was looted by the French forces, and a land grab ensued.

Northern Algeria was mostly under French control by 1834 but resistance continued, led by Emir Abdelkader, ruler of western and central Algeria and the great hero of Algeria’s nationalist movement. His armies held off the French for almost six years before they were defeated near Oujda in 1844. Abdelkader himself finally surrendered in 1846 and spent the rest of his life in exile. He died in Damascus in 1883, but not before being honoured by Queen Victoria for saving British citizens from a massacre there. Later, a rebellion in the Kabylie region spread throughout the country in 1871. The French only tightened their grip, responding with great force and confiscating more land from native Algerians.

French Algeria was not a colony, rather its three departements were constitutionally part of France. The French rebuilt Algeria in France’s image and distributed large parts of prime farming land to European settlers (known as colons and later pied-noirs) who arrived from Italy, Malta, Spain and Portugal, as well as France. Algerians could become citizens if they renounced Islam and Islamic law, something very few did, otherwise they remained 'subjects' with severely limited rights. By 1960, the population consisted of around nine million ‘Muslims’ and a million ‘Algerians’ – Europeans.

Revolution & Independence

Algeria’s war of independence, led by the newly formed Front de Libération Nationale (FLN; National Liberation Front), began on 31 October 1954 in Batna, east of Algiers. The French military, the FLN and the pied-noirs all committed atrocities, with the use of torture routine. It’s estimated that between 700,000 and 1.5 million lives were lost over seven years. President Charles de Gaulle, convinced of the impossibility of continued French rule, agreed to a referendum on independence in March 1962. The result was nearly unanimous, with most pied-noirs either abstaining or long departed. Independence was declared on 5 July 1962. By August, around 900,000 pied-noirs and harkis (Algerians who worked with the French) had left for France.

FLN candidate Ahmed ben Bella became Algeria’s first president. He pledged to create a ‘revolutionary Arab-Islamic state based on the principles of socialism and collective leadership at home and anti-imperialism abroad’. He was soon overthrown by former colleague Colonel Houari Boumédienne, who effectively returned the country to military rule in 1965.

Boumédienne died in December 1978 and the FLN replaced him with the slightly more moderate Colonel Chadli Benjedid, who was re-elected in 1984 and 1989. There was very little political change. The FLN continued to be the sole political party, pursuing secular, socialist policies. Any opposition was well underground, but in October 1988, thousands of people took to the streets in protest against austerity measures and food shortages. The army was called in to restore order, and between 100 and 600 people were killed.

The government reacted by pledging to relax the FLN monopoly on political power and work towards a multiparty system. The extent of the opposition became clear at local government elections held in early 1990, with landslide victories for the previously outlawed fundamentalist group Front Islamique du Salut (FIS; Islamic Salvation Front).

The initial round of Algeria’s first multiparty parliamentary elections, held in December 1991, produced another landslide win for the FIS. Chadli’s apparent acceptance of this prompted the army to step in, replacing him with a five-person Haut Conseil d’Etat (HCE; High Council of State) headed by Mohammed Boudiaf, a hero of the Algerian revolution. The second round of elections was cancelled, and FIS leaders Abbas Madani and Ali Belhadj were arrested, while others fled into exile.

Civil War

Boudiaf lasted six months before he was assassinated amid signs of a growing guerrilla offensive led by the Groupe Islamique Armé (GIA; Armed Islamic Group). He was replaced by former FLN hardliner Ali Kafi, who oversaw the country's rapid descent into civil war before he was replaced by a retired general, Liamine Zéroual. Zéroual attempted to defuse the situation by holding fresh elections in 1995, but Islamic parties were barred from the poll and Zéroual's sweeping victory came amid widespread claims of fraud.

Hopes for peace went unfulfilled; the war became even more remorseless, with Amnesty International accusing both sides of massacres. The GIA, angered by French aid to the government, extended the war to French soil with a series of bombings and hijackings.

Eventually, government security forces began to gain the upper hand, and at the beginning of 1999 Zéroual announced that he would be stepping down. New elections held in April that year resulted in a controversial victory for the establishment candidate Abdelaziz Bouteflika, a former foreign minister, who was elected unopposed after the rest of the candidates in the field claimed fraud and withdrew.

Bouteflika moved quickly to establish his legitimacy by calling a referendum on a plan to offer amnesty to the rebels. War-weary Algerians responded overwhelmingly with a 98% 'yes' vote, and by the end of 1999 many groups had responded and laid down their weapons. The exact number of those killed in the war will likely never be known and estimates vary from 44,000 to 200,000.