Libya, officially the State of Libya, is a country in the Maghreb region of North Africa. It borders the Mediterranean Sea to the north, Egypt to the east, Sudan to the southeast, Chad to the south, Niger to the southwest, Algeria to the west, and Tunisia to the northwest. With an area of almost 1.8 million km2 (700,000 sq mi), Libya is the fourth-largest country in Africa and the Arab world, and the 16th-largest in the world. The country claims 32,000 square kilometres of southeastern Algeria, south of the Libyan town of Ghat. The capital and largest city is Tripoli, located in the northwest and containing over a million of Libya's seven million people.
Libya has been inhabited by Berbers since the late Bronze Age as descendants from Iberomaurusian and Capsian cultures. In classical antiquity, the Phoenicians established city-states and trading posts in western Libya, while several Greek cities were established in the East. Parts of Libya were variously ruled by Carthaginians, Numidians, Persians, and Greeks before the entire region became a part of the Roman Empire. Libya was an early centre of Christianity. After the fall of the Western Roman Empire, the area of Libya was mostly occupied by the Vandals until the 7th century when invasions brought Islam to the region. From then on, centuries of Arab migration to the Maghreb shifted the demographic scope of Libya in favour of Arabs. In the 16th century, the Spanish Empire and the Knights Hospitaller occupied Tripoli until Ottoman rule began in 1551. Libya was involved in the Barbary Wars of the 18th and 19th centuries. Ottoman rule continued until the Italo-Turkish War in 1911, which resulted in Italy occupying Libya and establishing two colonies: Italian Tripolitania and Italian Cyrenaica, later unified in the Italian Libya colony from 1934 to 1943.
During World War II, Libya was an area of warfare in the North African Campaign. The Italian population then went into decline and Libya became independent as a kingdom in 1951. A bloodless military coup in 1969, initiated by a coalition led by Colonel Muammar Gaddafi, overthrew King Idris I and created a republic. Gaddafi was often described by critics as a dictator, and was one of the world's longest serving non-royal leaders. He ruled for 42 years until being overthrown and killed in the 2011 civil war, which was part of the wider Arab Spring, with authority transferred to the National Transitional Council then to the elected General National Congress.
Since 2011, Libya has been involved in a political and humanitarian crisis, and by 2014, two rival authorities claimed to govern Libya, which led to a second civil war, with parts of Libya split between separate governments, based in Tripoli and Tobruk, as well as various tribal and Islamist militias. The two main warring sides signed a permanent ceasefire in 2020, and a unity government took authority to plan for democratic elections, though political rivalries continue to delay this. In March 2022, the House of Representatives ceased recognising the Government of National Unity and proclaimed an alternative government, the Government of National Stability (GNS). Both governments have been functioning simultaneously since then, which has led to dual power in Libya. The international community continues to recognise the unity government as the legitimate government of the country.
Libya is a developing country ranking 115th by HDI, and has the 10th-largest proven oil reserves in the world. Libya has the highest level of greenhouse gas emissions per person in Africa, but has made little progress toward developing climate commitments. Libya is a member of the United Nations, the Non-Aligned Movement, the African Union, the Arab League, the Organisation of Islamic Cooperation, and OPEC. The country's official religion is Islam, with 96.6% of the Libyan population being Sunni Muslims. The official language of Libya is Arabic, with vernacular Libyan Arabic being spoken most widely. The majority of Libya's population is Arab.
The origin of the name "Libya" first appeared in an inscription of Ramesses II, written as rbw in hieroglyphic. The name derives from a generalised identity given to a large confederacy of ancient east "Libyan" Berbers, North African people(s) and tribes who lived around the lush regions of Cyrenaica and Marmarica. An army of 40,000 men and a confederacy of tribes known as "Great Chiefs of the Libu" were led by King Meryey who fought a war against pharaoh Merneptah in year 5 (1208 BC). This conflict was mentioned in the Great Karnak Inscription in the western delta during the 5th and 6th years of his reign and resulted in a defeat for Meryey. According to the Great Karnak Inscription, the military alliance comprised the Meshwesh, the Lukka, and the "Sea Peoples" known as the Ekwesh, Teresh, Shekelesh, and the Sherden.
The Great Karnak Inscription reads:
"... the third season, saying: 'The wretched, fallen chief of Libya, Meryey, son of Ded, has fallen upon the country of Tehenu with his bowmen—Sherden, Shekelesh, Ekwesh, Lukka, Teresh. Taking the best of every warrior and every man of war of his country. He has brought his wife and his children—leaders of the camp, and he has reached the western boundary in the fields of Perire."
The name "Libya" was brought back into use in 1903 by Italian geographer Federico Minutilli. It was intended to supplant terms applied to Ottoman Tripolitania, the coastal region of what is today Libya, having been ruled by the Ottoman Empire from 1551 to 1911 as the Eyalet of Tripolitania.
Libya gained independence in 1951 as the United Libyan Kingdom (المملكة الليبية المتحدة al-Mamlakah al-Lībiyyah al-Muttaḥidah), changing its name to the Kingdom of Libya (المملكة الليبية al-Mamlakah al-Lībiyyah), literally "Libyan Kingdom", in 1963. Following a coup d'état led by Muammar Gaddafi in 1969, the name of the state was changed to the Libyan Arab Republic (الجمهورية العربية الليبية al-Jumhūriyyah al-'Arabiyyah al-Lībiyyah). The official name was "Socialist People's Libyan Arab Jamahiriya" from 1977 to 1986 (الجماهيرية العربية الليبية الشعبية الاشتراكية), and "Great Socialist People's Libyan Arab Jamahiriya" (الجماهيرية العربية الليبية الشعبية الاشتراكية العظمى, al-Jamāhīriyyah al-'Arabiyyah al-Lībiyyah ash-Sha'biyyah al-Ishtirākiyyah al-'Udmá ) from 1986 to 2011.
The National Transitional Council, established in 2011, referred to the state as simply "Libya". The United Nations (UN) formally recognised the country as "Libya" in September 2011 based on a request from the Permanent Mission of Libya citing the Libyan interim Constitutional Declaration of 3 August 2011. In November 2011, the ISO 3166-1 was altered to reflect the new country name "Libya" in English, "Libye (la)" in French.
In December 2017, the Permanent Mission of Libya to the United Nations informed the UN that the country's official name was henceforth the "State of Libya"; "Libya" remained the official short form, and the country continued to be listed under "L" in alphabetical lists.
The coastal plain of Libya was inhabited by Neolithic peoples from as early as 8000 BC. The Afroasiatic ancestors of the Berber people are assumed to have spread into the area by the Late Bronze Age. The earliest known name of such a tribe was the Garamantes, based in Germa. The Phoenicians were the first to establish trading posts in Libya. By the 5th century BC, the greatest of the Phoenician colonies, Carthage, had extended its hegemony across much of North Africa, where a distinctive civilisation, known as Punic, came into being.
In 630 BC, the ancient Greeks colonised the area around Barca in Eastern Libya and founded the city of Cyrene. Within 200 years, four more important Greek cities were established in the area that became known as Cyrenaica. The area was home to the renowned philosophy school of the Cyrenaics. In 525 BC the Persian army of Cambyses II overran Cyrenaica, which for the next two centuries remained under Persian or Egyptian rule. Alexander the Great ended Persian rule in 331 BC and received tribute from Cyrenaica. Eastern Libya again fell under the control of the Greeks, this time as part of the Ptolemaic Kingdom.