Over the years, the oil industry has managed to deal with shahs and sheiks, kings and colonels, dictators and even democracies. So even before the death of Libyan leader Moammar Gaddafi, international oil companies were getting acquainted with his successors and figuring out how to reboot the North African nation’s oil sector.

Paolo Scaroni, the chief executive of the Italian oil giant ENI, met with the Libyan rebel government, the Transitional National Council, in April. ENI, which was the biggest operator in Libya during the Gaddafi era, has already restarted its activities. The company has been told that its contracts remain in effect, and last week it reactivated its Greenstream pipeline, which carries large volumes of natural gas from Libya to Italy. Before the fighting, the pipeline supplied about 10 percent of Italy’s natural gas.

Other companies, including American partners in the Oasis Group, expect to return to their former concessions.

Still, the death of the Libyan leader marked the end of an era for the oil world. Five months after he seized power in 1969, Gaddafi called for a 43-cent-a-barrel increase in the price of crude oil.

The head of Esso-Libya called the amount “out of the world,” according to Daniel Yergin, an industry consultant and author of “The Quest,” a book about the global energy business. But by shrewdly negotiating with and threatening the least diversified American company at the time, Occidental Petroleum, Gaddafi prevailed. He also won higher royalties and taxes. Soon other big oil companies agreed to the same terms, setting an example that other members of the Organization of Petroleum Exporting Countries followed.

Through a combination of lucky timing and adamant demands, Gaddafi helped change the balance of power between companies and exporting countries.

“Gaddafi opened the modern era of oil that set the stage for the oil crises of the 1970s,” Yergin said. But, he added, “Over the course of his 42-year rule, he squandered and wasted an enormous amount of the country’s oil wealth.”

In the past decade, even after U.S. sanctions ended and Gaddafi welcomed American companies back to their previous oil fields, it was still difficult to deal with him, industry executives said.

But eight months of strife and civil war eroded Gaddafi’s relevance to the oil world.

“The death of Gaddafi changes very little in the underlying dynamics of the oil picture on the ground,” said a report issued Thursday by Barclays Capital, the investment banking arm of Barclays Bank.

As fighting in Libya has eased, the oil companies have started to edge back. The country is already producing about 400,000 barrels a day, though most of that is going to domestic use, Barclays analysts Helima L. Croft and Amrita Sen wrote. About 130,000 barrels a day of refining capacity is back online, and the figure could expand to 300,000 by the end of the year.

How long it will take to get production back up to pre-civil war levels of about 1.6 million barrels a day remains uncertain.

“Some mature Libyan oil fields, such as those of the Sirte basin, require water or natural gas injection to maintain pressure in the reservoir, and that has not been done for over six months and the risk for failure on this front remains high,” the Barclays report said.

The report also said that oil terminals have been damaged and that looters have stolen machinery, such as power generators, pumps and trucks, from oil fields.

ENI, however, said its oil infrastructure was not damaged. The main damage was done at the company’s living quarters, “where everything removable was stolen,” an executive there said.

Security is bad in areas where the fields are concentrated, as well as down the line near the terminals. Because of the security concerns, ENI said it would first reactivate offshore fields.

“The loss of Gaddafi does not necessarily change the situation on the ground in resolving the issues of poverty and general unrest in the country,” the Barclays report said.

Once the new government establishes security, production should restart “relatively quickly,” ENI said. Most industry analysts expect at least 500,000 barrels a day of output by year’s end, and more soon after.

The revival of Libya’s oil production comes none too soon. Inventories over the past several months have fallen to levels below the five-year average, and the winter heating season is approaching.

One new international actor in the Libyan oil fields is likely to be Qatar. The Persian Gulf country provided military aid and oil export assistance over the past several months, and many analysts believe it will want to be rewarded.