Libya was part of the Ottoman empire from 1551 to 1911, when It was occupied by Italy. The Libyan people resisted the Italian colonialism since the beginning of the invasion.
The libyans organized a guerilla warfare under the leadership of Omar Al-Mokhtar, who got the surname of the Lion of the desert. The Libyan resistance continued for almost twenty years. Its leader was wounded and captured, then execued by the italian forces in 1931.
In 1939, another figure of the Libyan resistance the prince Muhammad Idris Al senussi, (Later king Idris I of Libya) was in exile in Egypt. In order to resume resistance againt the Italian and German occupation of Libya, launched consultations with Libyan notables and leaders residing in Egypt.
The prince, a political and religious figure, conviced the British commandment to support his efforts to create a Libyan army. The mission of this force was to participate in the liberation of Libya from Italian colonialism. This army was created on the 9th of August 1940 in Egypt under the name of the Senoussi army.
At the end of World War II, the italian occupation ended, but Libya remained under British and French occupation. The two northern provinces were under British occupation and the southern province under french occupation.
In 1951, Libya proclaimed independence as a united kingdom. It was composed of the three provinces: Cyrenaica (East), Tripolitania (west) and Fezzan (South). The prince Idris al Senussi was proclaimed King of Libya under the name of Idris the first.