Libyan authorities must find a way to disband and disarm the militias and allow the people to reclaim the revolution.
Libya's leaders must now confront Salafi extremists
One thing has become painfully clear as Libyans absorb the shock of the September 11 attack on the US consulate in Benghazi: the security vacuum that made the killing of four Americans possible is the greatest single danger to the aspirations of Libya's revolution.
Since its liberation from the dictatorship of Muammar Qaddafi, Libya has suffered from weak and fragmented security forces, lack of control over its borders, and the proliferation of weaponry among militia groups.
Almost one year later, the country has made no progress on any of these issues.
In fact the security situation seems to have deteriorated into lawlessness, leaving the country vulnerable to infiltration by militants. Elements such as the Ansar Al Sharia Brigade aim to use force to impose a rigid form of Sharia as the supreme law in Libya, according to Wahabi Islamic doctrine.
There are still conflicting reports about the assault. Susan Rice, the US ambassador to the UN, insists that the attack was not premeditated but simply part of protests against an inflammatory ant-Islam film. However, Ansar Al Sharia is widely suspected by Libyan leaders of being behind the violence.
The Wahabi ideology espoused by this militant Salafist group has no roots in Libyan society; it is being imported from Saudi Arabia.
In fact Libyan religious tradition has throughout its history been steeped in the moderate Malaki school and its more comprehensive approach to the study of Islamic jurisprudence.
These Wahabi followers insist on the strictest interpretation of Sharia as the only legitimate authority for the state, and they wholly reject the concept of democracy and free elections.
At the behest of Saudi clerics, Islamists in Libya initially opposed the uprising against the Qaddafi regime. Later they came out vehemently against the July elections.
The response was a high voter turnout and the wholesale rejection of Islamist parties, as Libyans chose the more liberal National Forces Alliance led by Mahmoud Jibril. This stunning rebuke to the hardliners reaffirmed to the world Libya's identity as a moderate Muslim society.
But this has not stopped the extremists from continuing their efforts to impose their will by force. In the weeks before the attack in Benghazi, Salafists in Zliten and Tripoli demolished Sufi shrines, mosques and graves, deeming these blasphemous although they had been part of Libyan history for centuries.
Incensed citizens tried unsuccessfully to stop them through demonstrations. Soldiers sent by the Supreme Security Council (SSC), the Ministry of Interior's Tripoli-based security apparatus, were at the scene, but made no attempt to prevent the wanton destruction. Their passivity seemed to imply tacit approval, even complicity.
How is it that a Salafist minority can carry out an unpopular, destructive agenda with impunity?
Responsibility for this lies squarely with the National Transitional Council (NTC), Libya's previous interim government, led by Mostapha Abdul Jalil. Through the last year, under his authority, Salafist sympathisers were allowed to infiltrate the NTC and the transitional government, particularly the Ministry of Interior and the SSC.
And instead of starting at once to build a professional national army and an effective police force, the NTC tried to appease Islamist militias, some of which had not even been part of the revolution, by bringing them into the SSC and giving them money and arms.
Unsolved assassinations of senior army officers, starting with the death last summer of General Abdul Fattah Youness, chief of staff of the revolutionary forces, have raised suspicions that militant Islamists are trying to prevent the emergence of a national army under government command.
Because of the disastrous policies of the NTC and transitional government, Libya's newly elected congress, led by Dr Mohamed Magariaf and Prime Minister Mostapha Abushagur, has inherited a crippled state and the biggest crisis since liberation.
But this is a defining moment for the country; its new leadership must rise aggressively to the challenges.
The killing of the ambassador of the United States, Libya's staunchest ally, has all but guaranteed a confrontation between the new government and the rising radical Islamists. Will those on the side of freedom and democracy be the ones left standing?
The Congress must quickly pass bold legislation to disband and disarm militias, and the government must come up with an effective plan to execute these laws, by force if necessary.
This last part is much more easily said than done and may even require the delicate assistance of international allies, unpopular though that would be.
Furthermore, for the key roles in his cabinet, Prime Minister Abushagur needs to select strong, capable, patriotic Libyans who are in touch with the situation on the ground and will meet any threats to Libya's security and sovereignty aggressively and head on.
Lastly, all segments of Libyan society - including political parties, NGOs, civil society organisations, tribal and religious leaders and the original revolutionary fighters - must come out in strong, unequivocal support of the government and denounce and confront armed groups operating outside of its authority through all available means.
It is time for the Libyan people to claim back their revolution. They have come too far and sacrificed too much to lose the dream now.
Hanan Ghosheh is a Libyan-American political analyst
On Twitter: @hdghosheh