“A lot of experts figured things were so unstable in Libya and politics were so opaque that they did not want to factor in more supply from there,” said Michael Lynch, president of Strategic Energy and Economic Research. With the Libyan surprise, he added, “OPEC has been wounded. It gets back to the problem that OPEC has a lot of members in bad shape, making it difficult for them to call on everybody to make sacrifices equally. So they excluded those three and now it’s come back to bite them.”

Oil prices have plummeted by 16 percent since late May, when OPEC announced an extension of its cutback agreement to next year. Global inventories of oil and refined products have remained stubbornly high, even during the summer driving season. Still, Saudi and other OPEC officials have expressed confidence that inventories and demand will come into balance in the fourth quarter of the year despite the increased oil production in the United States, Libya and a few other countries.

Libya continues to complicate that outlook.

The German oil company Wintershall reached an interim agreement to settle a dispute with the National Oil Corporation of Libya last week to resume production in two fields that potentially could combine to increase output by 160,000 barrels a day. Already, the country’s daily production has jumped by 50,000 barrels.

Last month the national oil company announced an aggressive three-phase development plan to lift Libyan output to 1.32 million barrels a day by the end of 2017, to 1.5 million barrels a day by the end of 2018, and to 2.2 million barrels a day by 2023. That kind of growth will require the expertise of Western oil companies that have mostly shied away from investing in Libya in recent years because of the instability and dangers to their workers. Few oil executives outside of Libya are optimistic that the goals will be reached.

Many oil experts say that the Libyan oil company and its partners have been lucky over the last year and that their luck may soon run out, in part because of the rising tensions between Qatar and its Persian Gulf neighbors along with Egypt. The Qataris are aligned with powerful members of the Tripoli-based government backed by Western nations and Turkey, while the competing government based in the eastern city of Tobruk is backed by the United Arab Emirates, Saudi Arabia, Egypt and Russia.

The two governments reached an uneasy deal in late 2015, and the national oil company tries to remain neutral, but the effort led by the United Arab Emirates and Saudi Arabia to isolate Qatar is already spilling over into Libya.