For a long time, Libya has remained on the edge of the global community because of its open support for terrorism. Libya was an open and acknowledged supporter of international terrorist groups (and earned a direct attack from the United States way back in 1986 for a bombing carried out by Libyan supported groups in a Berlin disco frequented by American servicemen). This was also followed by the explosion in a Pan Am fight over Lockerbie that killed all 270 on board and for which Libyan agents were blamed (and Libyan men were prosecuted and sentenced for the same crime. The consequence was a series of sanctions.
And then suddenly, a few years back, in 2003, Libya apparently and suddenly turned over a new leaf (suspicion was that it was done after the attack on Iraq under Saddam Hussein which showed the Libyan leader, Gaddafi, that his rule was under threat and could be attacked very easily; however, there were no apparent plans as such for any attack on Libya at that time). As a part of this, Libya stopped all efforts on developing nuclear weapons, and turned over all the plans and parts of its effort over to the US. And in a final effort, Libya agreed to pay compensation to the families of those who were killed in various terrorist activities such as flight bombings and the blast in the Berlin disco: