SidraExport Terminal Libya
A file photograph of the Es Sidra export terminal in Ras Lanuf, Libya. Reuters

Rival militias have clashed at Libya's Sidra and Ras Lanuf oil export ports over the weekend, resulting in a number of deaths and the closure of the terminals.

Fighting broke out on Saturday between pro-government forces and militants who control territory in the west of the country. At least five people were reported to have been killed.

Libya itself is torn between two rival governments, after a militant group called Libya Dawn seized the capital Tripoli. The recognised elected government has been forced to leave the capital and operate out of a city in the country's east.

Forces loyal to the Libya Dawn group launched the attacks on the oil ports on Saturday, which were being protected by militants loyal to the government.

Conflicting reports have emerged over who controlled the oil terminals on Monday.

The two terminals at Sidra and Ras Lanuf are responsible for around half of Libya's oil output, when operating at full capacity.

Libya's government relies heavily on oil exports to finance its annual budget.