The history Libya is covered under five distinct periods: Ancient period, the Islamic period, Ottoman rule, Italian rule, and the modern era.
Archaeological evidence indicates that from at least the eighth millennium B.C. Libya's coastal plain shared in a Neolithic culture, skilled in the domestication of cattle and cultivation of crops, that was common to the whole Mediterranean littoral. To the south, in what is now the Sahara Desert, nomadic hunters and herders roamed a vast, well-watered savanna that abounded in game and provided pastures for their stock. Their culture flourished until the region began to desiccate after 2000 B.C. Scattering before the encroaching desert and invading horsemen, the savanna people migrated into the Sudan or were absorbed by the Berbers.
The origin of the Berbers is a mystery, the investigation of which has produced an abundance of educated speculation but no solution. Archaeological and linguistic evidence strongly suggests southwestern Asia as the point from which the ancestors of the Berbers may have begun their migration into North Africa early in the third millennium B.C. Over the succeeding centuries they extended their range from Egypt to the Niger Basin. Caucasians of predominantly Mediterranean stock, the Berbers present a broad range of physical types and speak a variety of mutually unintelligible dialects that belong to the Afro-Asiatic language family. They never developed a sense of nationhood and have historically identified themselves in terms of their tribe, clan, and family. Collectively, Berbers refer to themselves simply as imazighan, to which has been attributed the meaning "free men."
Inscriptions found in Egypt dating from the Old Kingdom (ca. 2700-2200 B.C.) are the earliest known recorded testimony of the Berber migration and also the earliest written documentation of Libyan history. At least as early as this period, troublesome Berber tribes, one of which was identified in Egyptian records as the Levu (or "Libyans"), were raiding eastward as far as the Nile Delta and attempting to settle there. During the Middle Kingdom (ca. 2200-1700 B.C.) the Egyptian pharaohs succeeded in imposing their overlordship on these eastern Berbers and extracted tribute from them. Many Berbers served in the army of the pharaohs, and some rose to positions of importance in the Egyptian state. One such Berber officer seized control of Egypt in about 950 B.C. and, as Shishonk I, ruled as pharaoh. His successors of the twentysecond and twenty-third dynasties--the so-called Libyan dynasties (ca. 945-730 B.C.)--are also believed to have been Berbers.
In 647 an army of 40,000 Arabs, led by ‘Abdu’llah ibn Sa‘ad, the foster-brother of Caliph Uthman ibn Affan, invaded western Libya. Tripoli was taken from the Byzantines, followed by Sufetula, a city 150 miles south of Carthage, where the Exarch Gregory was killed. Gregory's successor, Gennadius, promised them an annual tribute of some 330,000 nomismata. Gennadius also sent the usual surplus of revenues over expenditures to Constantinople, but otherwise administered Africa as he liked. When Gennadius refused to pay the additional sums demanded from Constantinople, his own men overthrew him.
Following the revolt, Gennadius fled to Damascus and asked for aid from Muawiyah, to whom he had paid tribute for years. The caliph sent a sizable force with Gennadius to invade Africa in 665. Even though the deposed exarch died after reaching Alexandria, the Arabs marched on. The Byzantines dispatched an army to reinforce Africa, but its commander Nicephorus the Patrician lost a battle with the Arabs and reembarked. Uqba ibn Nafi and Abu Muhajir al Dinar did much to promote Islam and in the following centuries most of the indigenous peoples converted.
In 750 the Abbasid dynasty overthrew the Ummayad caliph and shifted the capital to Baghdad, with emirs retaining nominal control over the Libyan coast on behalf of the far-distant caliph. In 800 Caliph Harun ar-Rashid appointed Ibrahim ibn al-Aghlab as his governor. The Aghlabids dynasty effectively became independent of the Baghdad caliphs, who continued to retain spiritual authority. The Aghlabid emirs took their custodianship of Libya seriously, repairing Roman irrigation systems, restoring order and bringing a measure of prosperity to the region.
See also Ottoman Rule (15th-1912)
By the beginning of the 15th century the Libyan coast had minimal central authority and its harbours were havens for pirates. Habsburg Spain occupied Tripoli in 1510, but the Spaniards were more concerned with controlling the port than with the inconveniences of administering a colony. Ferdinand V took Tripoli and in 1528 gave it to the Knights of St John of Malta. In 1538 Tripoli was reconquered by a pirate king called Khair ad-Din (known more evocatively as Barbarossa, or Red Beard) and the coast became renowned as the Barbary Coast.
When the Ottomans arrived to occupy Tripoli in 1551, they saw little reason to rein in the pirates, preferring instead to profit from the booty. It would be more than two centuries before the pirates' control of the region was challenged.
Under the Ottomans, the Meghreb was divided into three provinces, Algiers, Tripoli and Tunis. After 1565, administrative authority in Tripoli was vested in a pasha appointed by the sultan in Constantinople. The sultan provided the pasha with a corps of janissaries, which was in turn divided into a number of companies under the command of a junior officer or bey. The janissaries quickly became the dominant force in Ottoman Libya.
In 1711, Ahmed Karamanli, an Ottoman cavalry officer, seized power and founded the Karamanli dynasty, which would last 124 years. In May 1801 Pasha Yusuf Karamanli demanded from the United States an increase in the tribute ($83,000) which that government had paid since 1796 for the protection of their commerce from piracy. The demand was refused, an American naval force blockaded Tripoli, and a desultory war dragged on until 3 June 1805.
In 1835, the government of Sultan Mahmud II took advantage of local disturbances to reassert their direct authority and held it until the final collapse of the Ottoman Empire. As decentralized Ottoman power had resulted in the virtual independence of Egypt as well as Tripoli, the coast and desert lying between them relapsed to anarchy, even after direct Ottoman control was resumed in Tripoli. Over a 75 year period the Ottoman Turks provided 33 governors and Libya remained part of the empire-- although at times virtually autonomous-- until Italy invaded in 1911, as the Ottoman Empire was collapsing.
The attempted Italian colonization of the Ottoman provinces of Tripolitania and Cyrenaica was never wholly successful. On October 3, 1911, the Italians attacked Tripoli, claiming somewhat disingenuously to be liberating Libya from Ottoman rule. Despite a major revolt by the Libyans, the Ottoman sultan ceded Libya to the Italians by signing the 1912 Treaty of Lausanne. Tripoli was largely under Italian control by 1914, but both Cyrenaica and the Fezzan were home to rebellions led by the Senussis. 150,000 Italians settled in Libya.
In 1920 (25 October) the Italian government recognized Sheikh Sidi Idris the hereditary head of the nomadic Senussi, with wide authority in Kufra and other oases, as Emir of Cyrenaica, a new title extended by the British at the close of World War I. The emir would eventually become king of the free Libyan state.
In 1944, Idris returned from exile in Cairo but declined to resume permanent residence in Cyrenaica until the removal in 1947 of some aspects of foreign control. Under the terms of the 1947 peace treaty with the Allies, Italy relinquished all claims to Libya. In July 1999 the Italian government offered a formal apology to Libya and it is reported that Italy agreed to pay USD $260 million as compensation for the occupation.
On November 21, 1949, the UN General Assembly passed a resolution stating that Libya should become independent before January 1, 1952. Idris represented Libya in the subsequent UN negotiations. When Libya declared its independence on December 24, 1951, it was the first country to achieve independence through the United Nations and one of the first former European possessions in Africa to gain independence. Libya was proclaimed a constitutional and a hereditary monarchy and Idris was proclaimed king.
The discovery of significant oil reserves in 1959 and the subsequent income from petroleum sales enabled what had been one of the world's poorest countries to become extremely wealthy. Although oil drastically improved Libya's finances, popular resentment grew as wealth was increasingly concentrated in the hands of the elite.
On September 1, 1969, a small group of military officers led by then 28-year-old army officer Mu'ammar Abu Minyar al-Qadhafi staged a coup d'état against King Idris, who was exiled to Egypt. The new regime, headed by the Revolutionary Command Council (RCC), abolished the monarchy and proclaimed the new Libyan Arab Republic. The new RCC's motto became "freedom, socialism, and unity." It pledged itself to remedy "backwardness," take an active role in the Palestinian Arab cause, promote Arab unity, and encourage domestic policies based on social justice, nonexploitation, and an equitable distribution of wealth.
The new government negotiated the Americans to evacuate the base from Libya. As a result US military forces was forced to leave Libya and close Wheelus Air Base.