Amid a frenzied mix of anger, disbelief and exultation, shouts of "Don't kill him! Don't kill him!" echoed through the crowd of rebel fighters as Libyan leader colonel Moamar Gaddafi was pulled from his hiding place inside a stormwater drain.

Key points: It has been eight years today since Gaddafi was captured and killed in Libya

It has been eight years today since Gaddafi was captured and killed in Libya Two opposing Libyan governments are on the brink of a civil war

Two opposing Libyan governments are on the brink of a civil war Support for both sides from outside nations have turned the current fight into a proxy war

The former dictator and a band of his most loyal men had been holed up inside an area of just a few suburban blocks in Gaddafi's childhood home of Sirte.

I had spent months embedded with rebel forces when on October 20, 2011, a convoy of around 40 cars fled the city and were bombed on the outskirts of town by NATO aircraft.

An injured Gaddafi had taken shelter in the drain which ran underneath a backroad, while the last of his men fought to their deaths to protect him.

My reporting from the scene that day of the brutality that followed shocked the world, but it is important to view it in the context of the legacy of violence left by the former regime.

Gaddafi was captured on the outskirts of his childhood hometown of Sirte. ( ABC News: Tracey Shelton )

All of the men present had faced death, lost family members and comrades, and many had been imprisoned and brutally tortured under the orders of the man they now found in front of them.

Shortly after amid graphic scenes of violence, Gaddafi was dead and exultation slowly turned to uncertainty and fear of what was to come among many of the younger fighters present.

Eight years later — with militia operating outside of the law and two opposing governments on the brink of a full-scale civil war — disillusioned Libyans are left wondering how a revolution that began so full of hope went so wrong.

What made Libya different during the Arab Spring?

Students, labourers, family men and business owners all took up arms against Gaddafi. ( ABC News: Tracey Shelton )

I first arrived in Libya during the early days of the revolution, which kicked off in February 2011 following similar uprisings in neighbouring Tunisia and Egypt.

For eight months, a ragtag crew of students, labourers, family men and business owners, as well as ex-military and police banded together with a dream of ending Gaddafi's 42-year rule.

ABC journalist Tracey Shelton exclusively captured Gaddafi's downfall. ( Supplied: Giovanni Diffidenti )

Many were young men barely out their teens, who were suddenly hailed as heroes in the towns resisting government forces.

Local businesses gifted them with free food and cigarettes, while blushing young women would sometimes pass them phone numbers in the street.

But the majority had never known life outside of Gaddafi's iron fist, and his legacy of violence is more evident than ever throughout Libya today.

Libyan political analyst Mohamed Eljarh explained to me while many nations in the region were also in the grip of their own uprisings — collectively known as the Arab Spring — that what made Libya different was a total lack of any form of political life whatsoever.

There had been no political parties or institutions and no constitution under Gaddafi.

Among Libya's neighbours, Tunisia and Egypt — while governed by autocratic regimes — both still held elections and also had unions and a civil society one could potentially participate in, despite being heavily controlled.

But in Libya, Gaddafi had created a system that revolved around him alone — so when he died, the entire system collapsed with him.

What went wrong following Gaddafi's death?

During the revolution period, rebel fighters had operated with near total impunity. ( ABC News: Tracey Shelton )

Some of the key issues Libya is facing today began in the days and months that followed Gaddafi's death.

The first was a failure to establish realistic plans for a post-Gaddafi Libya on the part of both the transitional government that had ruled the "liberated" parts of Libya since the uprising began and NATO partners, who carried out hundreds of airstrikes that turned the tide of the Libyan revolution.

While international partners failed to have a post intervention strategy, local leaders failed to create a "vision" for the future in terms of new economic and political systems, as well as the management of a reconciliation and justice process after eight months of bloody conflict and 42 years of dictatorship, Mr Eljarh said.

A second key issue which still plagues Libya today, was the empowerment of militia groups.

During the uprisings, rebel fighters had operated with near-total impunity as new leaders turned a blind eye to torture, looting and the execution of prisoners.

In the year that followed Gaddafi's death, those who fought on the side of the former Libyan leader were put on trial and in many cases charged with murder, even if they'd only killed in battle.

Meanwhile, those guilty of war crimes from the winning side walked free, even receiving positions of power in some cases.

For eight months, civilian and ex-military fighters banded together with a dream of ending Gaddafi's 42-year rule. ( ABC News: Tracey Shelton )

A prosecutor from the attorney-general's office in Tripoli explained to me at the time that in the eyes of the new government "Gaddafi troops targeted civilians, while rebel forces were defending them".

A United Nations report released in March 2012 said Libya's justice system was suffering from "a legacy of being used as a tool of repression" within which security forces "benefited from complete impunity".

In 2014, there were an estimated 1,600 militia groups. ( Asmaa Waguih: Reuters )

After defeating the former government's forces, militia groups had become the only functioning security force, which was later cemented by a decision to put those forces on the government pay role.

"It was a big mistake to try and compensate fighters in such a way, and this is what led to the creation of many militias," Mr Eljarh told the ABC.

The International Crisis Group estimated there were between 100 and 300 armed militia groups that fought against Gaddafi's forces — by 2014, that number had skyrocketed to approximately 1,600.

"Being a militia member became a source of prestige, impunity, social status and a huge source of income to many people."

A third key issue, was a failure to collect and secure the large amounts of weapons flooding through the nations streets following Gaddafi's death.

When the uprisings began, anti-government fighters lacked weapons and ammunition, so they began staging attacks on army bases and weapons storage units.

By the end of the uprising, Libya was "awash" with weapons. ( ABC News: Tracey Shelton )

When NATO forces bombed a weapons catchment area in the desert near Sirte, Gaddafi's men fled leaving behind 40 massive bunkers stretching as far as the eye could see, all full of weapons and ammunition up for grabs.

Hundreds of people rampaged through the stockpiles, as a trail of trucks, vans and cars streamed out with their trailers, backseats, rooftops and even bonnets loaded up to the brim.

Analysists say holding elections within "an armed environment" was a miscalculation. ( ABC News: Tracey Shelton )

When the fighting ended, both individuals and militia groups had amassed a huge stockpile of basic and advanced weaponry.

In towns like Misrata, which were instrumental in defeating Gaddafi's forces, almost every household had a collection of guns — many even had missiles and grenade launchers, and one family I knew even had their own personal tank in their backyard.

"In November 2011, NATO forces announced to the world their mission in Libya was accomplished, while the country was awash with weapons — more than 20 to 25 million pieces," Mr Eljarh said.

"The failure to collect those weapons or to have a program by which weapons were secured has made the language of violence the dominant one in Libya."

'The start of chaos': Parallel governments in a divided nation

Libya is controlled by two competing governments and various militia groups. ( ABC News: Graphic by Jarrod Fankhauser )

Since 2012, Libyan elections — hampered by unorthodox tactics, threats, violence and occasional kidnappings and assassinations — have failed to produce a majority win.

Holding elections within an armed environment like Libya was, according to Mr Eljarh, a "very unfortunate miscalculation", while former transitional government member Dr Faraj al-Sayeh said that "the speeding up of elections was the start of the chaos".

Dr Sayeh, now a professor at the University of Benghazi, believes that the National Transitional Council should have stayed in power to unify the military first, instead of the rush to hold elections and write a constitution, which resulted in "many pitfalls".

In June 2014, national election results for the House of Representatives were rejected by a coalition government in power in Tripoli, who had been previously elected and were backed by powerful militias.

The elected House established itself in the east of Libya, resulting in an institutional split of the country, which has since led to two opposing governments in the east and west that are now fighting for control of Libya's capital Tripoli.

General Haftar won popular support amid the chaos that followed Gaddafi's ouster. ( Reuters: Esam Omran Al-Fetori )

The east of Libya is controlled by General Haftar, a dual US-Libyan citizen who took power by force in 2014.

General Haftar was a former army officer under Gaddafi, who was sentenced to death in absentia for plans to stage a coup.

He returned to Libya from the US during the uprising and later became the commander of the Libyan National Army (LNA).

In February 2014, General Haftar announced in a televised statement that the government in Tripoli had been dissolved — although it continued to control Libya's west — and launched a two-year fight against militia groups in the East claiming he was "fighting terrorism" and trying to stabilise Libya.

Dr Sayeh said these Benghazi militia groups — many of which were affiliated with Al Qaeda or Islamic State — had "terrorised" the city, but after their defeat government institutions were established.

"You feel there is a state [in Benghazi]. It's not 100 per cent yet, but at least you can feel there is a system working," he said.

While many see Haftar as a "dictator" and a "counter-revolutionary", his strongman tactics have won popular support amid the chaos that followed Gaddafi's ouster, which has left some Libyans questioning the wisdom of removing the former authoritarian leader.

Prime Minister Fayez Serraj is the head of the interim Government of National Accord that controls the west. ( Flickr )

Tripoli and Libya's west meanwhile are controlled by the Government of National Accord (GNA), an interim government established in 2016 through a UN-led political agreement between the elected House in the east and the then-ruling government in Tripoli.

It is still recognised by the UN as the sole legitimate government in Libya, but the House of Representatives — who back General Haftar — has since withdrawn support for the deal.

In April 2019, General Haftar — supported by Saudi Arabia, the UAE and Egypt — launched an assault on Tripoli in an attempt to seize control of the whole country.

Militiamen fighting in Tripoli for the GNA — which is supported by Turkey and Qatar — say they are defending the revolution and civilian rule and fighting the return of a dictatorship, but observers maintain that the GNA do not have control over the militia forces in the area.

"It is the opposite, the militias are controlling the government," said Dr Sayeh, who visited Tripoli recently.

Militias fighting in Tripoli for the GNA say they are defending civilian rule. ( Reuters: Goran Tomasevic )

But while both sides argue their legitimacy, in reality neither have been democratically elected, and forces on both sides have been guilty of forced disappearances, unlawful detentions, killings, kidnappings, torture and extortion.

"In reality this is a struggle for power and a struggle for resources," said Mr Eljarh.

"And it has also turned into a proxy war as regional powers fuel the conflict for their own interests."

Libya's identity crisis and the fate of the Arab Spring

If the status quo continues, the result could be a prolonged, fractured, unstable Libya. ( Reuters: Esam Omran Al-Fetori )

The United Nations and international powers have been pushing for talks between the two sides, but many such talks have been held before and failed.

A clear winner could bring stability in some form, and some foreign powers — including the United States, Russia and France — have been toying with the idea of backing General Haftar to tip the current stand off in his favour. At the same time, countries like Turkey are heavily backing the GNA which is also the government recognised by the UN.

If the status quo continues, the result could be a prolonged, fractured, and severely unstable Libya.

Many of the young fighters that were so full of hope when the revolution began, say they remain trapped in a fight that seems endless within militia groups that have become their only source of security and livelihood.

After years of conflict and billions of dollars worth of damage to infrastructure, Libya's economy has also plummeted, while oil production remains stifled by security fears.

Mr Eljarh holds hope that "through this difficult experience Libya will as a nation emerge with a better understanding of what it is to be Libyan".

Libyan kids hold two fingers as a sign of victory. ( ABC News: Tracey Shelton )

Stability will require disbanding militias and collecting weapons, a task that is becoming more difficult by the day.

"Libyans on our part need to think about an overarching Libyan identity … a vision that represents the whole of Libya that would be enshrined in our constitution, and that deals with the issue of distribution of wealth and power," Mr Eljarh said.

"We have to keep the hope that we will eventually have a system that we have fought for, a system for which we struggled and paid dearly, and a system that we will all believe in — eventually."

For many of the Arab nations that rose up against autocracy in 2011, things have not necessarily gone so well either.

Tunisia is easily the most successful victor of the Arab Spring, with its institutions and civil society still undergoing formative and positive change many years after the overthrow of former leader Zine El Abidine Ben Ali.

But places like Syria and Yemen remain engulfed in bloody proxy wars, while Egypt was seized by the military who launched a brutal crackdown on civil society — other places like Bahrain saw protests quickly crushed before they ever really began.

"It would be very difficult for anyone to argue against any Libyan or Syrian who said that it was a mistake — we were not ready yet," Mr Eljarh said.

"But more recently, in Sudan and Algeria, protesters demanded change peacefully. They rejected violence and foreign interference … at least maybe others in our region are learning from our mistakes."

If collectively societies in the region learn from each other, Mr Eljarh, said they could create a lasting legacy.

"There is a glimmer of hope that after all of the struggle, something meaningful will emerge."