* Clashes ongoing close to oil ports

* Oil tanks thought to hold more than 400,000 barrels each

* NOC appeals for unity against common enemy

(Adds fifth tank on fire, detail, NOC comment)

By Ayman al-Warfalli

BENGHAZI, Libya, Jan 6 (Reuters) - Fires caused by fighting between Islamic State militants and guards near Libya's biggest oil ports have spread to five oil storage tanks that were still burning on Wednesday, a guards spokesman said.

Ali al-Hassi said the Petroleum Facilities Guards were in control of Es Sider and Ras Lanuf ports, but that clashes continued.

At least nine guards were killed and more than 40 injured in fighting around the perimeter of the area on Monday and Tuesday. Hassi said guards had recovered bodies of 30 Islamic State fighters, and had also captured two military tanks and other vehicles from the militants.

Four of the fires are at Es Sider and one at Ras Lanuf. Two blazes were triggered by shelling from Islamic State, and fire had spread to three more, Hassi said.

Mohamed al-Manfi, an oil official in eastern Libya, said each of the four oil tanks was estimated to contain 420,000 to 460,000 barrels of oil.

Es Sider and Ras Lanuf have been closed since December 2014. They are located between the city of Sirte, which is controlled by Islamic State, and the eastern city of Benghazi.

Libya is split between political factions and armed groups competing for power and for the country's oil wealth, four years after the revolt that toppled Muammar Gaddafi. Oil output has dwindled to less than one quarter of a 2011 high of 1.6 million barrels per day.

Islamic State has profited from a security vacuum to expand its presence, though it has not taken control of oil installations in the country.

The extremist group attacked guards at Es Sider in October, but its offensive this week appeared to be a more concerted assault on the ports.

Mustafa Sanalla, chairman of the National Oil Corporation (NOC) in Tripoli, said he hoped the violence would "lead political leaders on all sides in Libya to understand the magnitude of the threat we face."

"We need to unite against this common enemy, not tomorrow or next week, but now," he said in a statement.

The NOC also issued a separate statement saying it would do all it could to honour contracts and protect Libya's oil resources.

The U.N. is trying to win support for a deal to form a national unity government in Libya, but the plan has faced resistance from members of rival parliaments based in Tripoli and the east.

(Writing by Aidan Lewis; editing by Patrick Markey and William Hardy) ((Aidan.Lewis@thomsonreuters.com;))