File: Algerian Prime Minister Abdelmalek Sellal speaks after a meeting with his French counterpart Bernard Cazeneuve (unseen) during his visit to the capital Algiers on April 6, 2017.
Algeria, where legislative elections are to be held on Thursday, has major oil and gas reserves but faces a financial crisis due to the collapse in oil prices.
The country has been led since 1999 by Abdelaziz Bouteflika, who was re-elected to a fourth term in 2014 despite severe health problems.
1. Former French colony
Algeria became a French colony in 1830 after three centuries of Ottoman domination. Independence came in July 1962 after a bloody independence war which lasted nearly eight years.
In September 1963, Prime Minister Ahmed Ben Bella became the founding president of independent Algeria.
In July 1965, Houari Boumediene of the National Liberation Front (FLN), which had led the struggle against French colonial rule, overthrew Ben Bella. He ran Algeria as a one-party state until his death in 1978.
Colonel Chadli Bendjedid was then elected president, a post he held until he was forced to resign in January 1992.
2. Civil war
In October 1988, protests rocked the capital Algiers, prompting the authorities to declare a state of emergency.
The army clamped down on demonstrators, but introduced political reforms which brought an end to the single-party system.
However, when the country held its first multi-party legislative poll in 1991, the army stepped in to prevent the Islamic Salvation Front (FIS) winning and setting up an Islamic state.
That sparked a civil war that claimed some 200,000 lives, with the Armed Islamic Group (GIA) claiming responsibility for many large massacres of civilians.
3. Bouteflika clings to power
In 1999, at the height of the war, Bouteflika, backed by the army, won an election marred by the withdrawal of all six of his rivals, who alleged rampant fraud.
Bouteflika launched a reconciliation programme that saw thousands of Islamist fighters lay down their arms.
In April 2014, Bouteflika was re-elected for a fourth term with over 81 percent of the vote, despite a 2013 stroke that had confined him to a wheelchair.
His mobility and speech severely reduced, he has since rarely appeared in public since.
4. Oil wealth
Algeria in 1994 began liberalising its state-controlled economy, which is almost entirely dependent on oil and gas sales.
Those exports make up 95 percent of external revenue and contribute 60 percent of the state budget.
The drop in world oil prices has forced the government to increase taxes and abandon numerous public projects.
In a country of 40 million, half of the population is aged under 30 and one young person out of three is unemployed.
Income per capita dropped from $5,500 in 2013 to $4,850 in 2015, according to the World Bank.
In 2011 the country used its oil wealth to ramp up public salaries and subsidies, allowing it to avoid a wave of "Arab Spring" revolts sparked by a revolution in neighbouring Tunisia.
5. Africa's biggest country
Algeria is Africa's biggest country, covering 2.38 million square kilometres (920,000 square miles), with a Mediterranean coastline some 1,000 kilometres (600 miles) long.
Desert makes up more than five sixths of the country's territory, but 80 percent of the population lives on the coast including in the capital Algiers.