Muammar Gaddafi ( 1942 - 20 October 2011), commonly known as Colonel Gaddafi, was a Libyan revolutionary, politician, and political theorist. He governed Libya as Revolutionary Chairman of the Libyan Arab Republic from 1969 to 1977 and then as the "Brotherly Leader" of the Great Socialist People's Libyan Arab Jamahiriya from 1977 to 2011. He was initially ideologically committed to Arab nationalism and Arab socialism, but he came to rule according to his own Third International Theory. Gaddafi was born near Sirte to an impoverished Bedouin family. He became an Arab nationalist while at school in Sabha, later enrolling in the Royal Military Academy, Benghazi. Within the military he founded a revolutionary cell which, in a 1969 coup, deposed the Western-backed Senussi monarchy of Idris. Now in power, Gaddafi converted Libya into a republic governed by his Revolutionary Command Council. Ruling by decree, he ejected both Italian colonists and Western military bases from Libya while strengthening ties to Arab nationalist governments-particularly Gamal Abdel Nasser's Egypt-and unsuccessfully advocating Pan-Arab political union. An Islamic modernist, he introduced sharia as the basis for the legal system and promoted "Islamic socialism." The oil industry was nationalised, with the increasing state revenues used to bolster the military, fund foreign revolutionaries, and implement social programs emphasising house-building, healthcare, and education projects. In 1973, he initiated a "Popular Revolution" with the formation of General People's Committees, purported to be a system of direct democracy, but retained personal control over major decisions. He outlined his Third International Theory that year, publishing these ideas in The Green Book. In 1977, Gaddafi transformed Libya into a new socialist state called the Jamahiriya ("state of the masses"). During the 1970s and 1980s, Libya's unsuccessful border conflicts with Egypt and Chad, support for foreign militants, and alleged responsibility for the Lockerbie bombing left it increasingly isolated on the international stage. Amid the 2011 Arab Spring, protests against widespread corruption and unemployment broke out in eastern Libya. The situation descended into civil war, in which NATO intervened militarily on the side of the anti-Gaddafist National Transitional Council (NTC). The government was overthrown and Gaddafi, who had retreated to Sirte, was captured and killed by NTC militants.