Moammar Gadhafi, left, arrives for an Arab Summit Conference in Rabat, Morocco, with Egyptian President Gamal Abdul Nasser in December 1969, months after taking control of Libya in a bloodless coup.
Libya's path was never going to be easy, but its trajectory since Gadhafi's death has defied the worst predictions of chaos and civil war.
The Transitional National Council, headed by Mahmoud Jibril, oversaw the first phase of transition. It managed to bring all of Libya's factions to the bargaining table, crafted an electoral law and held successful elections on July 7. Despite security concerns, some 3,700 candidates contested 200 seats with a minimal violence.
Turnout was high among the 1.8 million Libyans who registered to vote in the country's first election since 1965. Bucking the Islamist tide that swept Tunisia and Egypt, Libya's secularists fared well, with the relatively progressive National Forces Alliance winning 39 out of the 80 seats.
There has also been a flowering of civil society in a country that for decades had almost none. Dozens of new organizations focusing on issues such as democracy building, the environment and women's rights have formed in the past year. Some groups played an important role in advocating for a female quota in the electoral law. As a result of that preference -- which required political parties to alternate male and female candidates on their ballots -- women won 33 of the 200 seats.
And thousands of Libyans shared their opinions of the draft law through the council's website and phone line and through social media. Libyans went from being barred from any kind of organized activity outside the reach of Gadhafi's network to creating a rich civic dialogue in a matter of months.
But Libya faces profound challenges, most notably the threat from armed militias that still control parts of the country. Some of those militias adhere to radical, jihadi ideologies. The terrorist attack on the U.S. consulate in Benghazi in which four Americans died, including Ambassador Chris Stevens, is a stark reminder of the danger posed by heavily armed militias and extremists. The government's inability to bring these militias under state control has contributed to an environment of lawlessness.