Algeria, officially the People's Democratic Republic of Algeria, is a country in the Maghreb region of North Africa. It is bordered to the northeast by Tunisia; to the east by Libya; to the southeast by Niger; to the southwest by Mali, Mauritania, and Western Sahara; to the west by Morocco; and to the north by the Mediterranean Sea. The capital and largest city is Algiers, located in the far north on the Mediterranean coast.
Inhabited since prehistory, Algeria has been at the crossroads of numerous cultures and civilizations, including the Phoenicians, Romans, Vandals, Byzantine Greeks, and Turks. Following a succession of Islamic Arab and Berber dynasties between the eighth and 15th centuries, the Regency of Algiers was established in 1516 as a largely independent tributary state of the Ottoman Empire. After nearly three centuries as a major power in the Mediterranean, the country was invaded by France in 1830 and formally annexed in 1848, though it was not fully conquered and pacified until 1903. French rule brought mass European settlement that displaced the local population, which was reduced by up to one-third due to warfare, disease, and starvation. The Sétif and Guelma massacre in 1945 catalysed local resistance that culminated in the outbreak of the Algerian War in 1954. Algeria gained its independence in 1962. The country descended into a bloody civil war from 1991 to 2002.