The violence that has flared in Libya between its fractious militias and tribal groupings in the aftermath of the 2011 war that ended the rule of dictator Moammar Gadhafi has already slowed the recovery of that industry.
Most importantly, it has scared off international oil companies without which Libya's oil and gas production cannot function.
The Sept. 11 killings in Benghazi, the cradle of the uprising against Gadhafi, have further slowed the return of the foreign oil workers.
That has jeopardized the new government's aim of boosting production from the prewar level of 1.6 million barrels per day to 3 million bpd -- a level it last achieved four decades ago, before Gadhafi's 1967 revolution -- by the end of 2015.
Libya, with Africa's largest oil reserves of 46 billion barrels, "has the potential to become an energy or petrochemical hub, but was deprived for 40 years of reaching its potential" by the economic mismanagement of the mercurial Gadhafi's regime, says Ahmed Shawki, head of marketing for the state-run National Oil Corp.
"Without foreign companies, Libyan oil production may well stagnate just below pre-crisis levels, worse, it risks slipping backward," Britain's Barclays Bank noted in a recent analysis of Libya's postwar prospects.
In July, Libyans got their first elected government, taking over the problem-plagued National Transitional Council that had governed -- or tried to -- following Gadhafi's overthrow and death in October 2011.
But it's going to take time for it to restore some sort of order in a country that endured nearly four decades of turbulent and often incoherent rule under Gadhafi.
Historically, Libya was divided into three regions: Tripolitania in the west, Cyrenaica -- often called Barca -- in the east, and sparsely populated Fezzan in the Saharan south.
Cyrenaica, with Benghazi, an Islamist bastion, as its capital, is the center of the oil industry with three-quarters of the country's known reserves, and its wants autonomy.
Tripolitania has much less oil but two-thirds of the population. Federalism will be problematic, to say the least.
Local militias in several regions pose threats to efforts to restore oil production, the country's economic lifeblood.
The largest of these militias are mainly in oil-producing regions such as Zentan, Misurata and Benghazi and have obstructed the formation of a national government to re-establish control over the fractured country and its deep-rooted tribal and regional rivalries.
"There are also jihadist militants and non-Arab tribal groups such as the Tuareg and Toubou that threaten Libya's security situation," observed U.S. global security consultancy Stratfor.
"An increase in tribal attacks can be expected and jihadist militants will continue to operate without a strong central government security presence."
The Sept. 11 killing of U.S. Ambassador Christopher Stevens and three other American embassy staff members in Benghazi is a vivid example of the militia-led violence that has been flaring in Libya since the civil war.
The Benghazi killings have been widely blamed on jihadist extremists linked to al-Qaida. During the Iraq war, U.S. forces found that Libyans comprised one of the largest national groups within al-Qaida's organization there.
"To continue doing business in Libya, foreign oil firms will likely need not only agreements with the nominal authority in Tripoli and the National Oil Corp. but also with regional oil authorities, regional political bodies, militia commanders and possibly tribesmen," Stratfor observed.
It said this was already happening, and reported that Western oil companies "have hired local militias, specifically the Zentan militia to protect southwestern oil fields" from Tuarag marauders in the desert region.
Amid this confusion, Iraq stands out as an example of the failure to clearly define how the oil sector will be regulated.
The deepening dispute between the Baghdad central government and oil-rich Kurdistan, with ambitions of independence, over who controls energy assets could lead to a splintering of the postwar state.
As the National newspaper of the United Arab Emirates observed: "Oil can be the glue that holds a country together or the lubricant that lets it slip apart."