Libya (ليبيا, ), officially the State of Libya, is a country in the Maghreb region in North Africa, bordered by the Mediterranean Sea to the north, Egypt to the east, Sudan to the southeast, Chad and Niger to the south and Algeria and Tunisia to the west. The sovereign state is made of three historical regions: Tripolitania, Fezzan and Cyrenaica. With an area of almost 1.8 e6km2, Libya is the fourth largest country in Africa, and is the 16th largest country in the world. Libya has the 10th-largest proven oil reserves of any country in the world. The largest city and capital, Tripoli, is located in western Libya and contains over one million of Libya's six million people. The second-largest city is Benghazi, which is located in eastern Libya.
Libya has been inhabited by Berbers since the late Bronze Age. The Phoenicians established trading posts in western Libya, and ancient Greek colonists established city-states in eastern Libya. Libya was variously ruled by Carthaginians, Persians, Egyptians and Greeks before becoming 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. In the 16th century, the Spanish Empire and the Knights of St John 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 Italian occupation of Libya resulted in the temporary Italian Libya colony from 1911 to 1947. During the Second World War, Libya was an important area of warfare in the North African Campaign. The Italian population then went into decline.
Libya became independent as a kingdom in 1951. A military coup in 1969 overthrew King Idris I. The "bloodless" coup leader Muammar Gaddafi ruled the country from 1969 and the Libyan Cultural Revolution in 1973 until he was overthrown and killed in the 2011 Libyan Civil War. Two authorities initially claimed to govern Libya: the Council of Deputies in Tobruk and the 2014 General National Congress (GNC) in Tripoli, which considered itself the continuation of the General National Congress, elected in 2012. After UN-led peace talks between the Tobruk and Tripoli governments, a unified interim UN-backed Government of National Accord was established in 2015, and the GNC disbanded to support it. Parts of Libya remain outside either government's control, with various Islamist, rebel and tribal militias administering some areas. As of July 2017, talks are still ongoing between the GNA and the Tobruk-based authorities to end the strife and unify the divided establishments of the state, including the Libyan National Army and the Central Bank of Libya.
Libya is a member of the United Nations (since 1955), the Non-Aligned Movement, the Arab League, the OIC and OPEC. The country's official religion is Islam, with 96.6% of the Libyan population being Sunni Muslims.