Algeria, a gateway between Africa and Europe, has been battered by violence over the past half-century.
There are conflicting reports about the death toll during the war against France for independence in the 1950s and early 60s. French historians estimate that up to 400,000 Algerians were killed, while the Algerian government says more than one million people died.
The country later endured a brutal internal conflict after when elections that Islamists appeared certain to win were cancelled in 1992; a low-level Islamist insurgency still affects Algeria.
The Sahara desert covers more than four-fifths of the land. Algeria is the continent's biggest country, and is the world's 10th largest.
Oil and gas reserves were discovered there in the 1950s, but most Algerians live along the northern coast.
People's Democratic Republic of Algeria
Population 41 million
Area 2.4 million sq km (919,595 sq miles)
Major languages Arabic, French, Berber
Major religion Islam
Life expectancy 75 years (men), 77 years (women)
President: Abdelmadjid Tebboune
Abdelmadjid Tebboune won the December 2019 presidential election from a field candidates all associated with the era of Abdelaziz Bouteflika, the long-serving head of state forced out of office by mass protests in April.
The opposition boycotted the election, demanding a clean sweep of the military-dominated elite and a sustained campaign against corruption.
Mr Tebboune has pledged to carry out the necessary reforms, but the former civil servant faces a serious challenge in winning over public trust.
Algeria has a lively private press but the state broadcaster avoids criticism of the government.
Recent legislation allows several privately-owned TV stations to operate from Algerian soil, but none of them are opposition-leaning.
Some key dates in Algeria's history:
1830 - France seizes Algiers, ending Algeria's three centuries as an autonomous province of the Ottoman Empire.
1939-1945 - The Collapse of France and the Anglo-American occupation of North Africa during Second World War encourages hopes for independence.
1945 - Pro-independence demonstrations in Setif. Thousands are killed in suppression of ensuing unrest.
1954-1962 - Algerian War of Independence.
1962 - Independence.
1976 - Algerian, Moroccan armies clash over Western Sahara.
1989 - New constitution removes the one-party state and moves country away from socialism to western capitalism.
1991-1999 - Civil war pitting Islamists against the government.
1999 - Abdelaziz Bouteflika becomes president, introduces national reconciliation policy.
2019 April - President Bouteflika announces he will step down after street protests.