BENGHAZI, Libya (Reuters) - Eastern Libyan forces said they thwarted an attempted advance on some of Libya’s major oil ports on Wednesday, hitting a rival faction with air strikes and capturing some of its commanders.

The violence raised the prospect of a fresh struggle for control of the oil ports and for overall power between the many armed factions in anarchic Libya that have competed with each other in shifting alliances since a 2011 uprising.

It came a day after forces led by brigades from the western city of Misrata completed a near seven-month battle to oust Islamic State militants from their erstwhile North African stronghold in Sirte, the hometown of late dictator Muammar Gaddafi and less than 200 km (125 miles) northwest of the oil ports.

A spokesman for the Libyan National Army (LNA), as the eastern forces are known, said rival fighters had withdrawn after briefly occupying the town of Ben Jawad, 30 km (19 miles) west of the port of Es Sider, and were being pursued in the surrounding area. Four LNA troops were killed and seven wounded in the clashes, a medical source in nearby Ras Lanuf said.

The National Oil Corporation (NOC) said it had not suspended any loadings, but was monitoring the situation carefully.

One eastern security official said the groups that advanced towards the ports in Libya’s Oil Crescent were linked to the Benghazi Defense Brigades, which tried this year to launch a counter-attack against the LNA.

The LNA is commanded by Khalifa Haftar, who has become a figurehead for factions in the east while waging a military campaign against Islamist militants and other opponents over more than two years.

In September his forces seized control of four Oil Crescent ports from a rival faction, allowing the NOC to end blockades at three of the ports and double national oil production to about 600,000 barrels per day (bpd).

Speculation had risen about a possible counter-attack against the oil ports by forces including the faction that was ousted in September, Islamist militant-leaning brigades with support from Misrata, and a Haftar rival who was named as defense minister by a U.N.-backed Government of National Accord (GNA) in Tripoli.

A statement published by Libyan media and purporting to come from the defense ministry in Tripoli said a unit had been formed to “liberate the oil fields and ports from mercenaries” and return Libyan oil resources to national institutions “without restrictions or conditions”.

But the GNA’s leadership, or Presidential Council, said in a statement that it had “no link with what is happening in the Oil Crescent”, denying reports that it had given instructions to any force in the area.