With tanks and mercenaries one the streets of Benghazi and opposition forces threatening to cut oil pipelines, the failures of Muammar Qaddafi's regime are being defended by savage violence.
Qaddafi remains one of few constants for troubled Libya
"The time has come for us to deal America a strong slap on its cool, arrogant face," said a fresh-faced, 31-year-old Col Muammar Qaddafi in 1973, as he nationalised US oil interests in Libya.
Speaking in 2009, his hair now needing dye to keep it black, his face jowly and the tone more restrained, his theme was the same: "Oil exporting countries may move toward nationalisation because of the rapidly declining prices."
Under his rule Libya has gone through an extraordinary roller coaster of oil boom, pan-Arabism, socialism, depression, sanctions, pan-Africanism, economic liberalisation, another boom and now near-civil war.
The one constant is Qaddafi himself, the world's longest-serving non-royal head of state, having outlasted another oil potentate, Gabon's Omar Bongo, who died in 2009.
Editor's Pick - Oil and gold climb amid uncertainty in the region
At the time of Qaddafi's coup, Libya even matched Saudi Arabia in output. Initially, the oil wealth of the 1970s was used to build a modern society along the same lines as the Gulf.
But Libya then engaged in military adventures, fighting a sporadic war in neighbouring Chad between 1978 and 1987, and, as reported by The Economist, backing African rebels such as Foday Sankoh in Sierra Leone, whose limb-chopping depredations were memorably portrayed in the 2006 film Blood Diamond.
Oil prices fell and production stagnated, throwing Libya's economy into a long slump. Alleged support for terrorism, notably the 1988 Lockerbie bombing, led to international sanctions. In 1980, the country's citizens were almost as rich as those in the US; by 2000, Libyans were only a fifth as wealthy.
Libya entrusted oil sector reform to a western-educated technocrat and in 2003 turned to Dr Shukri Ghanem, once Opec's head of research. As prime minister until 2006, he opened Libya up to foreign investment aided by a political thaw with the West.
No longer able to hide behind sanctions as an excuse for Libya's poverty and mismanagement, liberalisation was much needed.
An executive from one western oil corporation described finding, on his return to the fields he had operated in the 1960s, "the worst-run oil company" he had ever seen.
In the mid-2000s, Libyan oil output grew strongly in response to Dr Ghanem's initiatives. With production growing to 1.8 million barrels per day (bpd), he set a target of 3 million bpd by 2015.
Combined with the sharp appreciation in oil prices, downtown Tripoli was soon overshadowed by cranes, as sub-Saharan African workers laboured on luxury hotels and offices.
But other forces within Libya were reasserting themselves. In 2009, the small Canadian company Verenex, one of the few successful explorers, accepted a bid from the China National Petroleum Corporation. The Libyans blocked the deal and ultimately bought Verenex themselves for 30 per cent less.
The vice began to close on foreign companies: ENI, Total, Repsol, Occidental and Petro-Canada agreed to halve their shares of production in return for extending their deals.
Companies were required to do all of their engineering work in Libya, then in September 2009, that their general managers should be Libyan. Few had made discoveries big enough to justify their aggressive bids. Occidental handed back all nine licences it had won at such expense in 2005.
Such policies were attempts to reconcile a notionally socialist state with pro-market reforms. Speaking in January to the consultancy McKinsey, as revolution swept Tunisia, Dr Ghanem pointed out that "people see … apparent contradictions. You invite foreign companies into your country and employ almost 2 million foreigners, yet 300,000 Libyans have no job".
But in 2009, Dr Ghanem fell victim to the anti-reform forces. He was accused of micromanagement and resigned, only to return two months later.
He bewailed the failure to build a non-oil economy: "When our governments have a lot of money from oil, they spend it quickly. We should have learnt to keep some of the proceeds of the fat years for the lean years … Whenever they [oil producers] see gold glittering, they spend it."
But the erratic changes of course were also part of Col Qaddafi's own strategy to maintain power by keeping everyone else in an uncertain street. Projects have stalled; oil output has been stagnant since 2006; companies have been required to dismiss all consultants; and work on a new airport terminal and property projects have ground to a halt.
The Libyan oil sector could have become an engine of national growth and development in its own right, or a source of money to build a diversified economy. It has achieved neither; instead, it has delivered something like a drip of nutrients, just enough to keep a comatose patient alive.
Now, with tanks and mercenaries on the streets of Benghazi and opposition forces threatening to cut oil pipelines, the regime's failures are being defended by savage violence.
Robin Mills is an energy economist based in Dubai, and author of The Myth of the Oil Crisis and Capturing Carbon.