A Libyan official says fighting between Islamic State militants and forces loyal to the government based in the country's capital, Tripoli, has killed 10 troops.

Ismail al-Shukri, says Wednesday's clashes took place near the town of Nofaliya, close to the country's main oil terminal overlooking the Mediterranean Sea.

It's the latest in a deadly campaign by IS extremists targeting Libya's lucrative oil facilities. The militants have already overrun several oil fields and control the city of Sirte, near Nofaliya.

Al-Shukri says that along with the 10 killed, four troops were wounded in the fighting. The force is a mix of regular and militia troops that answer to the government in Tripoli.

Libya's political crisis has left the country with two parliaments and two governments, along with rival militaries and militias.