King Idris I was in Turkey for medical treatment on September 1, 1969, when a group of junior army officers took over Libya. The conspirators called themselves the Free Officers. They moved in the early hours, took the radio station, the barracks and the government offices in Tripoli and Benghazi, and had the country by morning. Almost nobody was killed.
The man who led them was Muammar Gaddafi, a 27-year-old captain in the signals corps. He announced the abolition of the monarchy and the birth of the Libyan Arab Republic. Idris, who had ruled since 1951 and was the only king Libya ever had, stayed in exile in Egypt and died there in 1983. His nephew and designated heir, Hasan ar-Rida, was arrested.
The coup was made possible by the shape of the state it replaced. The Kingdom of Libya was a federation created by the United Nations out of three regions, Tripolitania, Cyrenaica and Fezzan, which had little in common and no shared political tradition. The monarchy rested on the Sanussi religious order, on a network of tribal loyalties, and on foreign military bases: Britain and the United States kept airfields there. Oil exports had begun in 1961 and were generating huge revenues by 1969, but the money was concentrated in few hands, and the officer corps, drawn increasingly from inland and urban families, had no stake in the order it was defending.
So there was no resistance. The army units that might have fought for the king were outnumbered or had already been suborned, and the tribal leadership calculated that it had more to gain by dealing with the new government.
Gaddafi then spent four decades dismantling the institutions he inherited. He removed the British and American bases, nationalized the oil industry, closed the foreign banks, and in 1977 declared the country a jamahiriya, a "state of the masses" run through local committees with no formal head of government. He was killed in October 2011 in his home city of Sirte during the civil war that broke out that February, after NATO aircraft began striking government forces.