Algeria, officially the People's Democratic Republic of Algeria, is a country in the Maghreb region of North Africa. It covers an area of over 2,381,741 square kilometres (919,595 sq mi), and is the largest country in Africa and the tenth-largest country in the world by land area. With a population of 47 million, Algeria is the tenth-most populous country in 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. Algeria's largest city is Algiers, located in the far north on the Mediterranean coast.
Algeria has been at the crossroads of numerous cultures and civilisations for millennia, including the Phoenicians, Numidians, Romans, Vandals, and Byzantine Greeks. Its modern identity is rooted in centuries of Arab Muslim migration since the seventh century and the subsequent Arabisation of indigenous Berber populations. 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 independence in 1962. It descended into a bloody civil war from 1992 to 2002, remaining in an official state of emergency until the 2010–2012 Algerian protests during the Arab Spring.