Almost eight years after the fall of Libyan leader Muammar Gaddafi, the country is deeply divided between east and west. A war economy has enriched armed groups and a battle to control the country's oil fields is ongoing.

Libya's $80bn in oil revenues and foreign reserves are managed by the government in Tripoli. But General Khalifa Haftar, who has seized oil fields in the south and in the east of the country, has set up a parallel government in the east and his forces are advancing on Tripoli - igniting fears of renewed war.

And as the country's debt keeps piling up, there seems to be very little inclination for all sides to come together.

So who is funding Haftar? Who controls Libya's oil? What's the state of the economy in the divided nation? And what is at the heart of the ongoing conflict?

"I don't think ideology really plays any significant role in the conflict. If anything, ideology tends to be a layer, an excuse that both sides tend to use to increase their legitimacy, especially internationally ... What really matters is money; it's all about controlling the rents, whether it's oil or access to foreign currency. Militias have been fighting [against] each other ... because they need and they want access to the rents in order to redistribute it and to effectively support their patronage networks," says Riccardo Fabiani, a Geopolitical analyst at Energy Aspects.

"People like Haftar - but this also happens on the other side - use ideology to boost their own legitimacy in the eyes of partners like Saudi Arabia and the UAE."

Fabiani believes that "a military endgame to the conflict in Libya remains elusive despite all the claims ... they can conquer Tripoli ... it's unrealistic even though he [Haftar] controls now two-thirds of the country. He is trying to build parallel institutions in eastern Libya, trying to centralise power ... but the endgame here remains a negotiated settlement ... a settlement on his terms."

"The conversation has shifted. It's now all about empowering Haftar and convincing the other parties to join him, even though they might not like him, they might not want him as a dictator, effectively, in charge of the country," the analyst says.

According to Fabiani, what Haftar really wants is to be seen as a "legitimate player in the Libyan conflict, as somebody who can bring stability and therefore can be trusted by the international community ... So for him [Haftar] controlling the oil is an instrument, is a tool that he can use to boost his own legitimacy. He can go to the international community, and to the West in particular, and say, 'Look, I control the oil here and yet, I am not trying to sell it independently. I am still keeping everything as it is, all the arrangements are still valid, are still applicable. I am the person who can bring order and stability to the oil sector and I will not attempt to sell it independently."

Also on this episode of Counting the Cost:

Ukraine's conflict zone: How a conflict with Russian-backed fighters has hurt Ukraine's most important economic region, drained public resources and exhausted voters. Jonah Hull reports from Mariupol.

Saudi Aramco data: Bigger than Apple, Alphabet and Amazon combined. We take a dive into Saudi Aramco's financials.

India economy: Why one of India's most trusted economists has cast doubt on the nation's economic growth. And why overseas investors are buying Indian stocks. Ewan Thompson from Neptune Investment Management, talks to Counting the Cost.

Affordable housing crisis in the US: More and more Americans are struggling to pay their rent and the problem is not just limited to major cities. Eight million people in 152 rural communities are without a decent place to live. Poverty, job loss and a lack of government programmes are increasing the crisis, as Andy Gallacher reports from Florida.

Source: Al Jazeera News