Militant gunmen attacked Libya's al-Ghani oilfield on Friday, killing 11 guards, beheading some of them, before local forces fought back to retake control, an oil security official said.
The al-Ghani attack illustrated Libya's growing instability where two rival governments battle for control while extremist militants profit from chaos to secure a foothold four years after civil war ousted Muammar Gaddafi.
Libya's internationally-recognised government of Prime Minister Abdullah al-Thinni has operated out of the east since a rival armed faction called Libya Dawn took over Tripoli in fighting last summer and set up its own administration.
With the rival governments both claiming legitimate control over oil operations, details about attacks, oil shipments and even production are difficult to verify.
The state-run National Oil Corporation in Tripoli said unidentified gunmen attacked al-Ghani from the north on Friday, causing "massive damage" without further details.
Oil security forces, allied with Thinni's eastern government, said on Friday they had retaken control of al-Ghani after the attack which killed at least 11 guards.
"Our forces have taken back control of al-Ghani oilfield from militants," security official Ali Hassi said. Several of those had been beheaded, he said, putting the total at 11 dead.
Hassi said they were also now in control of Mabrouk, Bahi and Dahra oilfields in the central Sirte basin, which were attacked by Islamist militants over the last week.
Libya's rival factions this week held United Nations-backed talks in Morocco in an effort to form a unified government and end a conflict Western officials fear will spiral into a full-blown civil war.
But air strikes on rival targets escalated three days before the talks in Morocco, and previous rounds of talks yielded little concrete progress.
"It is a difficult process. It would not give answers in hours or even days," UN envoy to Libya Bernardino Leon said after meetings in Morocco with the two factions.
Fighting between the rival governments has closed two major export terminals since December and slashed the state's crude output to less than half of the 1.6 million barrels per day produced in the Gaddafi era.
Islamist militants have been blamed for overrunning the Bahi and Mabrouk fields. Dahra has also been the site of clashes between Islamist militants and oil security forces.
Libya declared force majeure on 11 oilfields in its central region earlier this week after halting production there because of deteriorating security.
Last month, gunmen killed 12 people south of Sirte, among them two Filipino and two Ghanaian nationals, after storming a remote oilfield. Officials said most of the victims were beheaded or shot.
Track Latest News Live on NDTV.com and get news updates from India and around the world