A resident of Benghazi, he studied Economics at the University of Benghazi. He served from 1972 to 1977 as head of the board of auditors at the Libyan Arab Republic's Revenue Court, where he proved uncomfortable for the regime because of his anti-corruption stance and was subsequently designated Libya's Ambassador to India. After being recalled to Libya in 1980, he announced his defection in Morocco due to his certainty that he would be purged on return. He survived at least three assassination attempts.
With the NFSL: 1984-2011
On 8 May 1984, el-Magariaf directed commandos from the National Front for the Salvation of Libya led by Ahmed Ibrahim Ihwas in an attempt to assassinate Muammar Gaddafi, via an attack on Gaddafi's headquarters. The attack failed. Al-Magariaf, the "National Front for the Salvation of Libya" broadcast opposition propaganda into Libya. Magariaf dedicated himself to overthrowing the Libyan Arab Jamahiriya with violence. In response, Gaddafi later targeted Al-Magariaf. Subsequent to the founding of the National Front for the Salvation of Libya, el-Magariaf is one of few people who knew he was targeted by Gaddafi's bombing of UTA Flight 772 in 1989. The NFSL was founded in 1981, as the first opposition group pushing for democratic reforms in Libya. The NFSL called for a democratic government with constitutional guarantees, free and fair elections, free press, separation of powers, non-discriminatory rule of law, gender equality, multi-partyism, sustainable development, and a realistic democratic road-map that benefits from Libyan, Arab and Islamic traditions as well as democratic learning from Nelson Mandela's democratisation experience from South Africa, amongst others. At the onset of the Libyan Civil War, Magariaf remained active in engaging with his political contacts, in an effort to gain international support for himself and the Libyan people.
Magariaf was elected President of the General National Congress on 9 August 2012. He received 113 votes in Congress against 85 votes for his independent rival, Ali Zeidan who went on to become Prime Minister in November. After serving as President for 9 months he resigned in May 2013 in anticipation of the political isolation law which was passed, barring him from office due to his previous role as an ambassador under the Gaddafi regime.
Assassination attempt
Magariaf survived an attempt on his life in the southwestern Libyan town of Sabha on 4 January 2013. He had been visiting the town with a GNC delegation as part of a fact-finding mission aimed at helping the government restore security and crack down on smuggling operations in the south of the country. Magarief told reporters that his hotel was attacked by gunmen, triggering a three-hour gun battle with his personal bodyguards in which three of them were injured. Magarief escaped the incident unharmed.
Political ideology
Magariaf is reported to have good relations with the Muslim Brotherhood, yet is perceived as a moderate pragmatist who led one of the most liberal parties in the 2012 election. His agenda is to focus on the Libyan economy.