As the forces of military strongman General Khalifa Haftar bear down on the Libyan capital, Foreign Editor David Pratt examines how the road from the 2011 revolution might now be leading to another civil war.

Looking back now there was so much optimism despite the dangers and challenges the revolution had thrown up. From Benghazi in the east to the capital Tripoli in the West, most ordinary Libyans were simply glad to see the back of the old regime.

“This revolution is not a revolution of starving people or those who want money, this revolution is one of free souls, this revolution says we want freedom from Gaddafi,” I recall one young man called Mohammed Sallah, a 23-year- old medical student, telling me at the time.

From the very first day since the uprising against Colonel Muammar Gaddafi’s decades-long rule had begun, so many ordinary Libyans had taken to the streets prepared, if necessary, to forfeit their lives for the cause in which they so passionately believed.

“All my life I’ve worked on the oil rigs in the desert for little pay while Gaddafi makes a fortune,” Ahmed Rafa, a 42- year-old driver who had volunteered to join the rebels, told me.

In their filthy clothes, he and a group of other rebel fighters had made camp by the roadside in the desert west of Benghazi under a truck on top of which sat a huge rusting artillery cannon. “I haven’t got a wife, haven’t got a house, I haven’t got a car and nothing in the bank because I’m paid so little, all of this I got from Gaddafi,” Ahmed Raza explained.

Back then in 2011, during those heady days of the Arab Spring uprising, those like Mohammed Sallah and Ahmed Raza, along with many other Libyans, firmly believed their country was now destined for better, more peaceful, times.

In the eight or so intervening years that have passed, however, Libya has never really been fully at peace.

The chaos in Libya has slashed the country’s oil production, drained much of its sovereign wealth, offered havens to Islamist militants and turned its long Mediterranean coast into a major point of departure for African and Middle Eastern refugees fleeing to Europe.

Throughout this process, time and again the country has lurched from crisis to crisis, fractured and unstable with the threat of all out civil war never far away. Right now is one such moment.

It was on Thursday that General Khalifa Haftar, the leader of eastern Libya militias, known by their self-styled title the Libyan National Army (NLA), ordered his forces to advance on Tripoli, where the country’s internationally-backed Government of National Accord is led by prime minister Fayez al-Sarraj.

“We are coming Tripoli, we are coming,” military strongman Haftar warned in an audio recording posted on the army’s Facebook page before ordering his forces to march towards the city, after they took over Gharyan, a town some 62 miles south of the capital.

In a remarkable show of arrogance, Haftar’s offensive coincided with a visit by Antonio Guterres, the UN’s secretary-general who arrived in Libya to broker a political process leading to peace. Since then, things have gone from bad to worse.

Realising the dangers the crisis posed, Guterres said on Friday morning that he was flying east from Tripoli to Tobruk and Benghazi to hold talks with Haftar, but these proved unsuccessful.

“I leave Libya with a heavy heart and deeply concerned. I still hope it is possible to avoid a bloody confrontation in and around Tripoli,” Guterres tweeted later that same day.

The assault by Haftar’s LNA has raised fears that the oil-rich North African nation might be plunged into its worst civil war since Gaddafi was ousted. More immediately it could result in a battle for Tripoli, the seat of a UN-backed government that is protected by an array of militias holding sway over the city’s economy and institutions.

No sooner had Haftar given his order to move on Tripoli than the city’s allied militias responded themselves by mobilising for “war” by deploying troops and moving weapons from the coastal towns of Misrata and Zawiya to areas around the capital.

For the moment the crisis is escalating fast. But just who is General Haftar and why has he chosen this moment to make his move, one that could again plunge Libya into the abyss of war?

To understand the answers to these questions, it’s necessary to return again to those turbulent days of the revolution against Gaddafi in 2011.

Originally from Cyrenaica in Libya’s east, Haftar received military training in the Soviet Union before taking part in the 1969 coup, which brought Gaddafi to power. Before the dictator’s overthrow in 2011, Haftar was a one-time officer in Gaddafi’s army. But a subsequent coup plot against the leader prompted two decades of exile in Virginia where Haftar was rumoured to be a client of the CIA before he returned to Libya after Gaddafi was violently toppled in 2011.

Hoping to lead the revolution against Gaddafi, Haftar was sidelined by the rebels before re-emerging as a political and military player in 2014.

In those chaotic years that followed Gaddafi’s fall and killing, various armed groups vied for control and Haftar’s NLA was one of them. Under the guise of “cleansing” the country of what he called “terrorist” militias, Haftar launched what he dubbed “Operation Dignity”.

The 75-year-old general, who has switched sides and loyalties in the course of a military career spanning 50 years, portrayed himself as the only man who could bring stability to Libya and crush the nation’s Islamists.

According to some observers, it’s a pitch that has won Haftar audiences with leaders everywhere from Paris to Moscow, Cairo to Riyadh and Abu Dhabi.

UN investigators say that the United Arab Emirates, Egypt and Saudi Arabia have provided military support to Hafter’s campaign, backing the Libyan general because he has vowed to eliminate political Islamists they oppose from Libya.

It is Haftar’s latest offensive on the Libyan capital itself that many see as the most worrying development, not least because it comes precisely at the time when the UN is trying to broker a peace deal in Libya. In short, Haftar’s surprise military thrust last Thursday appeared to be a gamble that he could now seize control before any deal was finalised.

“Declaring an operation to move on Tripoli the same day that Guterres arrived hoping to give impetus to the forthcoming peace conference was really audacious,” says Mary Fitzgerald, former foreign correspondent and now a researcher specialising on Libya.

“Haftar has tried to undermine the UN process at every step. He wants to create facts on the ground ahead of that UN conference planned for mid-April,” Fitzgerald insists. As the situation continues to boil, the UN Security Council, meanwhile, has called on Haftar’s forces to stop all military action.

Some observers, however, believe that Haftar’s ultimate goal after moving into the country’s southwest oil fields was always to take Tripoli.

“You cannot rule Libya unless you control Tripoli. Because all the money, diplomatic missions and most of the population is there, everything is concentrated there,” points out Jalel Harchaoui, a research fellow at the Netherlands-based Clingendael Institute of International Relations.

As Haftar’s forces advanced on Friday, G7 foreign ministers said that they were strongly opposed to military action in Libya and implicitly warned the eastern Libyan commander against continuing his push on the capital.

“We firmly believe that there is no military solution to the Libyan conflict,” the foreign ministers from France, Britain, Germany, United States, Italy, Japan and Canada said in a statement.

“We strongly oppose any military action in Libya. Any Libyan actor or faction that precipitates further civil conflict are harming innocent people and standing in the way of the peace that Libyans deserve,” the statement added.

While diplomatic pressure grows, the LNA says it has now taken the areas of Qasr bin Ghashir and Wadi al-Rabie on the southern outskirts of the capital, seizing the former Tripoli International Airport, which has been abandoned since a 2014 battle. But other reports suggest that Haftar’s forces, which include Sudanese and Chadian mercenary fighters, are not having it all their own way on the battlefield.

Since moving towards Tripoli the LNA have encountered stiff resistance and failed to take a checkpoint about 18 miles west of the capital in a bid to close the coastal road to Tunisia.

Armed groups allied to the Tripoli government have also moved more machine gun-mounted pickup trucks from the coastal city of Misrata to Tripoli to defend it against Haftar’s forces.

Pockets of fierce opposition to his bid to take the capital have sprung up, particularly among the Zintan militias southwest of Tripoli and in Misrata, a city ferociously opposed to Haftar. Already some of these same government militias are said to have taken 145 LNA fighters prisoner in Zawiya, west of Tripoli.

With no armed force under its own command, the Tripoli government depends on its security on a fractious array of local militias with their own conflicting motives, including many that UN experts have said are involved in migrant smuggling, extortion and other crimes.

With these militias’ forces now forming a loose alliance to stop Hafter, Tripoli residents raced to stock up on food and fuel in anticipation of a prolonged struggle. Lines outside petrol stations these past few days have stretched for hundreds of yards and drivers often waited more than an hour-and-a-half to fill up their tanks.

As citizens in Tripoli prepared for the worst, Libyan interior minister Fathi Bashagha insisted that Haftar is making his move at an unprecedented time of calm and showing flagrant disregard for civilians caught up in the LNA’s advance.

“Why use weapons and force to terrorise the people of Libya, to kill them, and to force them to accept one thing only, which is to be ruled by a military dictator?

“What makes Mr Haftar a better candidate than other Libyans?” Bashagha told Al Jazeera.

“We will not be subdued by any use of force by any side or any person. And if anyone is willing to use force against us we’re ready for sacrifice but we will not give up on democracy which we’ve always wanted from the beginning,” added Bashagha.

What the ultimate outcome of this steadily building crisis will be is still difficult to determine, but the dangers of a potentially catastrophic and protracted conflict are obvious.

At the core of Libya’s political turbulence since 2011 have been differences between Islamic and nationalist camps, ethnic and tribal rivalries, regional and local identities. Oil, of course, the main source of government revenue, has been one of the main drivers of the conflict.

Eight years on the hopes of all those who in 2011 thought Libya was on a better political and economic trajectory continue to be dashed. Right now the road from revolution could well lead to civil war.