Born near Sirte, Italian Libya, to a poor Bedouin family, Gaddafi became an Arab nationalist while at school in Sabha, later enrolling in the Royal Military Academy, Benghazi. Within the military, he founded a revolutionary group which deposed the Western-backed Senussi monarchy of Idris in a 1969 coup. Having taken power, Gaddafi converted Libya into a republic governed by his Revolutionary Command Council. Ruling by decree, he deported Libya's Italian population and ejected its Western military bases. Strengthening ties to Arab nationalist governments—particularly Gamal Abdel Nasser's Egypt—he unsuccessfully advocated pan-Arab political union. An Islamic modernist, he introduced "sharia" as the basis for the legal system and promoted "Islamic socialism". He nationalized the oil industry and used the increasing state revenues to bolster the military, fund foreign revolutionaries, as well as implement social programs emphasizing house-building, healthcare and education projects. In 1973, he initiated a "Popular Revolution" with the formation of Basic People's Congresses, presented as a system of direct democracy, but retained personal control over major decisions. He outlined his Third International Theory that year in "The Green Book".