When militia forces led by a rogue general stormed Libya's parliament on May 18, the crisis in the country took on a new dimension. How much support did the controversial General Khalifa Hifter enjoy among the Libyan people? How much foreign backing did he have? Could he get away with this sensational "coup" - as some are calling it?
For many who are aware of Hifter's background, there was little doubt that the affair had to be taken seriously. Hifter, former army chief of staff under the late leader Muammar Gaddafi, has been leading an armed revolt, dubbed "Operation Dignity". It was aimed at eradicating Islamists from parliament, whom he blamed for fueling chaos and the rise of extremist forces in the country.
Hifter is not a likeable fellow, but most people in eastern Libya support his campaign, which is widely seen as the most serious threat yet to the post-Gaddafi government. Libya's interior ministry, along with the commander of the air force, have backed his offensive against Islamist lawmakers and extremist militias.
Hifter has now called on the Supreme Court to set up a civilian council, which would oversee the appointment of an emergency cabinet and the holding of new elections.
Let there be no doubt: However all this plays out, Libya today stands at the edge of a precipice and very few appreciate the depth of the abyss it risks falling into. But let us go back to where it all really began.
Opportunists and thugs
After the revolution, the ranks of the "revolutionaries" who fought the Gaddafi dictatorship swelled with the huge number of opportunists and thugs who saw it as an opportunity to enrich themselves under the guise of having fought the dictatorship.
|Inside Story - Libya power struggle: brink of civil war?
The stash of weapons amassed by the Gaddafi regime soon found their way into the hands of these thugs who formed an assortment of militias. Most of these turned out to be Islamist militias with the goal of turning Libya into a "pure" Islamic state.
In a well-coordinated, covert political move, members of these religious militias infiltrated the General National Congress (GNC), the country's legitimate ruling body. Once there, they diverted huge sums of money to these groups, ostensibily to protect the cities. Within months of the GNC elections, Libya became a haven for terrorists.
And with a central government too weak to stem their growth or challenge them, these groups grew larger and stronger. A case in point is Ansar al-Sharia in the eastern province of Cyrenaica, where they operated and trained. The group is categorically opposed to democracy, secularism, voting, modernity and calls for a return to what they believe is the purity of the 7th century Islamic state.
Like the Takfiris and Salafists, they abhor the concept of the modern nation-state and they will go to any length to undermine it. In Benghazi, these groups attacked and murdered members of the security forces and ordinary Libyans who spoke out against them.
The government was powerless stop them and other semi-religious militias whom they were linked with. Ansar al-Sharia dominated cities in the east. In the city of Derna, the Takfiris established their "caliphate", where segregation between the sexes, forced prayer and banning of entertainment is common practice.
The absence of any effective government plunged the country into a state of disorder. Smugglers, gangs, tribes and districts fought for influence and booty. All demanded protection money to stop.
Communities close to oil fields shut off pipelines and tried to embezzle funds from the foreign companies managing the operation. The cost of state projects went up because of corruption.
Libya's security situation has become intolerable. It was particularly bad in Benghazi where the local Special Forces lacked government-support, leaving the city woefully under-armed and unprotected.
Enter Khalifa Hifter
However, the enigmatic General Khalifa Hifter's re-entry into the scene was to change that equation. Hifter was part of the cadre of young army officers who helped Gaddafi come to power in 1969 and became head of Gaddafi's army during the 1980, and was involved in Libya's war with Chad,
|Fault Lines - Libya: State of Insecurity
He was captured but was allegedly given safe passage to the United States by the Central Intelligence Agency. He spent 20 years in exile in Virginia, before returning to Libya in 2011 to assume a leading position in the Libyan military. Last year, he surprised Libyans by announcing a coup in a video posted online - but nobody took him seriously and he was ridiculed for it.
Hifter saw an opportunity to return to prominence by confronting the terrorists in Libya. On May 16, with a small contingent of men, he launched an attack against Ansar al-Sharia and its allies in Benghazi. For the first time in two years, Benghazi 's residents celebrated the beating the terrorists received, and Hifter's fortunes gradually improved.
The central government condemned him as a rogue, and ordered his and his men's arrest. Yet within a week of fighting the terrorists, Hifter had garnered the support of most of the military forces in the country's east and a few in the west. He promised to protect the legitimately elected state authority, yet he turned around and launched an attack against the GNC and the government.
While few would dispute Hifter's assertions about the role some parliamentarians have played in "fomenting terrorism", two wrongs do not make a right. Hifter's dictatorial tendencies are evident and frightening to many Libyans. Indeed, some political parties have already told him he needed to commit to democracy and free elections. Hifter seems to cherish his newfound power and although he has in the past professed a disinterest in holding office, he has now proclaimed that he would run for president should the people of Libya wish it.
Hifter's ambitions, however, will be challenged by formidable forces in the west of Libya, where Islamists still operate freely. They do not murder as they do in the east but they aspire to turn the country into an Islamic State. There is little doubt that they are watching events unfold, and they are plotting a response.
Dr Mansour O El-Kikhia is a columnist, educator, and writer on international and Middle Eastern affairs.
The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.