Libya was never ruled by a single "colonial master" but rather by two European powers sequentially before gaining full sovereignty.
Libya's coastal regions (Tripolitania, Cyrenaica, Fezzan) were nominally Ottoman provinces, though local autonomy was significant.
Italy invaded in 1911, formally annexing the territory as "Italian Libya" in 1934 after a brutal 20-year pacification campaign led by Generals Badoglio and Graziani. Resistance, notably by Omar Mukhtar in Cyrenaica, was fierce. Italy invested heavily in infrastructure and settler colonization (over 100,000 Italians by 1939).
After Italy's WWII defeat, Libya was occupied by Allied forces: British in Tripolitania and Cyrenaica, French in Fezzan. The 1947 Paris Peace Treaty forced Italy to renounce all claims.
Under UN supervision, Libya became the United Kingdom of Libya on December 24, 1951—a federal monarchy under King Idris I. It was the first African nation to gain independence through the UN.
Thus, Libya's colonial rulers were Italy (primary colonizer) and, briefly, British and French military administrations—not a single enduring colonial master.