Militants attacked guards at a gate near Es Sider port

BENGHAZI, Libya, Oct 1 (Reuters) - Islamic State militants attacked forces guarding one of Libya's main oil ports on Thursday with a gun assault and an attempted car bomb in an escalation of their campaign in the North African state, a local security official said.

Islamic State has gained ground in Libya where two rival governments -- one internationally recognized and the other self-declared -- are battling for control, leaving a security vacuum four years after the uprising toppled Muammar Gaddafi.

Militants attacked guards at a gate near Es Sider port, which is under the control of forces allied with the recognized government, the security official said. The terminal has been closed since December because of fighting with other rival armed factions and problems at supply oilfields.

"An attack was carried out by militants of Islamic State on a gate before sunset in the Es Sider area," Ali Hassi, spokesman for the a local battalion of the Petroleum Facilities Guard, a force allied with the official government.

He said one guard was killed and two more wounded, but he gave no details about how close the gate was to the port itself. Militants later tried to target the same gate with a car bomb but failed and four of them were shot dead, he said.

Libya's oil infrastructure has been battered by the emerging conflict in the OPEC state, where rival armed factions, Islamist militants and tribal groups often battle each other and protesters close oilfields to demand jobs and payments.

Tripoli is under the control of Libya Dawn forces, which set up their own self-declared government and parliament. The internationally recognized government operates out of the east. Both are backed by loose alliances of armed factions.

In the chaos, Islamic State has set up a base in the city of Sirte, and has attacked oilfields before. In March, they attacked al-Ghani oilfield, and nine oil workers including foreigners were kidnapped there.

But a move to try to attack a key field or port like Es Sider would be a major escalation of their campaign.

Es Sider and the Ras Lanuf oil terminals, which have been closed since December, are the country's main oil ports and have a combined capacity of around 600,000 barrels per day.

Western governments, concerned about the growing Islamic State influence and the flow of illegal migrants from Libya's coast, are pushing for the two rival governments to accept a United Nations-backed peace deal. (Reporting by Ayman El-Warfalli; writing by Patrick Markey)

Our Standards: The Thomson Reuters Trust Principles.