Libyan defense forces prepare to camp outside the Millitah Oil and Gas installation on March 4, 2013, on the outskirts of Zwara in Western Libya. According to the International Energy Agency, Libya’s oil production climbed back to 1.4 million barrels a day last month, or nearly 90 percent of prewar production levels. (MAHMUD TURKIA/AFP/GETTY IMAGES)

Libya’s oil and gas sector, long the lifeblood of this desert nation, has made a surprising recovery since the country’s bloody 2011 revolution.

Thanks to concerted efforts by the national oil company — and those of major foreign firms that have retained a leading role in Libya’s oil fields for decades — the country’s oil production has climbed back to 1.4 million barrels a day in recent months, according to the International Energy Agency, or nearly 90 percent of prewar production levels.

The rebound in the oil sector marks a stark contrast with much of the rest of Libya, where, two years after the fall of Moammar Gaddafi, a weak central government has struggled to secure borders and rein in hundreds of well-armed militias.

Many here say the industry has recovered so well because Libyans know just how desperately the country, which sits atop the largest proven oil reserves in Africa, needs the valuable liquid to survive.

“It’s the only natural resource we have in Libya. And we are only as rich as these revenues remain,” said Essam Gheriani, a prominent businessman and activist in the eastern city of Benghazi.

A quick rehabilitation of Libya's oil sector.

Libya’s oil and gas industry accounts for about 90 percent of government revenue, and officials say a broad understanding of the sector’s importance has helped spare the country from episodes like the deadly January attack by militants on a gas field just across the border in Algeria.

But popular goodwill has its limits. Increasingly disgruntled Libyans have on several recent occasions channeled their frustration at the slow pace of development and political reform into protests near oil and gas facilities — bold moves sure to draw the government’s attention.

Gaddafi, who maintained security through an array of paramilitary and intelligence agencies, launched an oil protection force in the latter years of his four-
decade rule. As the regime’s institutions collapsed in 2011, the rebels quickly re-created the force, largely recruiting from their fighters who had moved in to protect the facilities while the war was raging.

Today, officials from the Oil Ministry and the National Oil Corp., the state enterprise that has a hand in all hydrocarbon dealings, often juggle job descriptions closer to those of local politicians — offering employment and promising roads, schools and other facilities to ward off civil unrest, which could jeopardize the sector.

The NOC has also tapped the expertise of foreign oil giants that preceded Gaddafi and that he invited to return before his fall, in most cases to the same fields they had worked years earlier, to boost sagging production.

Despite fears of Algeria-style problems in Libya, where extremist ideology has found a foothold, Libyan officials say the oil sector is close to making a full recovery.

In its March 13 report, the International Energy Agency said production in Libya had restarted “faster than anyone expected” but added that security risks remain and that increased militant activity could curb output.

For now, Germany’s Wintershall is expected to add 100,000 barrels a day, and a consortium of Libya’s state-owned company, Hess, ConocoPhillips and Marathon will add another 100,000 barrels a day, according to Petroleum Argus, an industry newsletter.

Caution amid production

Some foreign oil companies have been cautious about expanding their projects, Libyan and international oil officials say.

BP, which has historical claims to vast concessions across Libya, maintains a local staff of about 80 people in Tripoli, the capital, but has “no discoveries, no developments, no production,” said Robert Wine, a spokesman for the company.

At the time of the revolution, BP was about to start drilling its first exploration well onshore in the Ghadames Basin, near Libya’s western border with Algeria and Tunisia. “That hasn’t been started yet, and we are reviewing our security plans in the light of the In Amenas atrocity” in Algeria, Wine wrote in an e-mail. Four BP employees were killed in the attack.

But Italian oil giant ENI, which has a huge stake in Libya, said its share of production has climbed to 250,000 barrels a day, down from 280,000 before the war.

And Arturo Gonzalo, director of institutional relations and corporate responsibility at Spain’s Repsol, said its consortium is back to prewar production levels. He said that “security has been reinforced in all the region” since the Algeria incident and that many expatriates who left were “slowly going back.”

He called the safety situation “very fluid” but said “Libya is consolidating its structures, and they are proving that they can handle the situation so far.”

But protests and violence have periodically shut down production. Early this month, clashes erupted between local tribesmen and the forces tasked with guarding a natural gas complex in western Libya over which group had the right to guard the facility. The violence temporarily halted trans-Mediterranean exports to Europe from the Mellitah gas installation, a joint venture operated by the national oil company and ENI.

Last year, protesters forced temporary shutdowns of at least four facilities across Libya, including the Repsol-run Sharara oil field deep in the Sahara desert and a coastal refinery. In one incident that started in December and continued into early this year, protesters halted exports from the Zueitina terminal in the east for three weeks, cutting production by more than 70,000 barrels a day, according to Omar Shakmak, Libya’s deputy minister of oil and gas.

All of the incidents concerned “general demands for the government,” said Walid Hassan, a spokesman for the oil protection force. The guards refrain from using force in such cases to allow the ministry and the oil company to negotiate with the protesters, Hassan said. “In some areas, they just need basic things — they ask for roads or to build new hospitals,” he said.

‘You have to listen to them’

On a recent weekend, Libya’s oil minister, Abdelbari al-Arusi, woke up before dawn and, with an entourage of industry officials, boarded a tiny twin-engine aircraft that carried him from Tripoli into the Sahara desert for visits to three natural gas fields and a crucial oil refinery. Arusi didn’t come to look at equipment; he came solely to hear demands, an activity that has become a regular aspect of his job.

At the Attahaddy gas field in Libya’s eastern desert, workers in blue jumpsuits complained about raises and promotions overdue from the Gaddafi era. At the remote Sahel gas field, employees criticized poor communications equipment and bad roads. And at the Brega oil refinery and petrochemical plant, the demands came not from employees but from local tribal leaders, who wanted jobs for their boys and compensation for war damages.

“The Libyan people now, you have to listen to them,” Arusi said later. “If you don’t listen to them, they’ll cause problems for you.”

Wintershall, which operates fields in partnership with the NOC in eastern Libya’s Sirte Basin, also said that cultivating relationships with residents near its operations has been a critical component of security. “This relationship has been invaluable during the revolution, and it still is,” Uwe Salge, the company’s general manager in Libya, said in a statement.

But the slow pace of development in other sectors keeps the pressure high, oil officials said.

Last month, a group of former rebel fighters from the restive eastern city of Darna went to Arusi’s office in Tripoli, he said. “They said: ‘We’re fed up, and we want a job in your sector. If you don’t have a job, give us a ticket to Syria,’ ” he said.

The men had only elementary school educations, Arusi said, and the government had done little to provide postwar opportunities for them, a situation faced by many of the revolution’s fighters. “So I told them I’d give them jobs in the oil sector — in security,” Arusi said.

Struggles and opportunities

Others want a cut, too. Eastern Libya is home to most of the country’s oil reserves, but Gaddafi neglected development in the region for decades, favoring Tripoli and his strongholds in the south and west. Now, eastern Libyans want to see a larger share of the country’s oil and gas infrastructure, as well as the central bureaucracy, moved to major cities in the east such as Benghazi. Some federalists in the east said they would even consider occupying oil and gas facilities if the government fails to act.

To alleviate some of the tension, Arusi said the National Oil Corp. is in the process of transferring the headquarters of its petrochemical operation to Benghazi.

But oil officials insist Libya’s energy sector is still functioning remarkably well, given the circumstances.

“We are struggling to bring back the [foreign] contractors,” said Abdel Karim Gabali, a manager at the Sirte Oil Co., an NOC subsidiary. “They are still thinking the situation is insecure, but this is not true.”

Steven Mufson in Washington and Ingy Hassieb and Sharaf al-Hourani in Cairo contributed to this report.