Politically, Idris spent the early part of his career attempting to negotiate independence for his territory. When that failed, in 1922, he went into exile in Egypt, which served as his base in a guerilla war against the colonial authorities. At the same time, he was also asked to become emir of Tripolitania, another of the three traditional regions that constitute modern Libya (the third is Fezzan). By accepting he began the process of uniting Libya under a single monarchy.
During World War II, Idris supported the United Kingdom and brought the Cyrenaican nationalists to fight alongside the Allies against the Axis, which occupied Libya. With the defeat of the Germans under Erwin Rommel, he was finally able to return to his capital, Benghazi, where he led the team negotiating with Great Britain and the United Nations over independence. Independence was achieved on December 24, 1951, and Idris was proclaimed king of Libya.
To the chagrin of Arab nationalists at home and supporters of Pan-Arabism in neighboring states, Idris maintained close ties with the United Kingdom and the United States, even after they intervened in Egypt during the 1956 Suez Crisis. Another threat to his regime was his failure to produce a male heir to succeed him to the throne. Thus, while the country prospered from its oil fields and the presence of American bases, the future was shaky and the king was in poor health.
On September 1, 1969, Idris was finally ousted in a coup led by Moammar Al Qadhafi. He went into exile in Egypt, where he died in 1983.