BENGHAZI, Libya, Jan 24 (Reuters) - Firefighters have put out fires started by an attack by Islamic State militants at the major Libyan oil terminal of Ras Lanuf, a spokesman for guards at the terminal said on Sunday.

At least five of the terminal's 13 tanks were damaged as a result of Thursday's attack, firefighters have said. One of the tanks collapsed completely.

Petroleum Facilities Guard spokesman Ali al-Hassi said authorities were still assessing the extent of the damage.

The National Oil Corporation (NOC) has said it fears that up to 3 million barrels of oil could be lost and that the terminal, shut since December 2014, faces a lengthy closure.

Libya has been riven by violence and political turmoil following the uprising that overthrew Muammar Gaddafi in 2011. Rival governments backed by armed factions in Tripoli and the east have battled for power and a share of the country's oil wealth.

The Islamic State militants drove into the oil storage site and clashed with security guards before retreating and firing from a distance to set tanks on fire, NOC spokesman Mohamed al-Harari said on Thursday.

Islamic State militants have taken advantage of a security vacuum to establish themselves in the city of Sirte, about 200 km (125 miles) along the coast to the west of Ras Lanuf and the nearby terminal of Es Sider, which is also closed.

On Saturday, armed forces allied to Libya's eastern government said they had carried out airstrikes on Ben Jawad, a town where Islamic State militants have recently consolidated their presence. It lies just 30 km (19 miles) west of Es Sider on the road to Sirte.

Libya's oil production has dropped to under 400,000 barrels per day, less than a quarter of a 2011 high of 1.6 million bpd.

(Reporting by Ayman al-Warfalli; Writing by Aidan Lewis; editing by Adrian Croft) ((Aidan.Lewis@thomsonreuters.com; 00216-29850352))