Islamic State (IS) militants and Libyan forces were engaged in a pitched battle on Wednesday for coastal oil terminals that experts said hold the key to the extremists establishing control of the country and turning it into a base for future attacks in Africa and Europe.
Five oil tanks in the Libyan cities of Es Sider and Ras Lanuf were on fire on Wednesday as IS fighters shelled the Mediterranean port cities, Reuters reported. Libyan National Oil Corporation Chairman Mustafa Sanalla issued a statement urging the various non-IS factions in Libya's ongoing civil war to form an alliance against the militant group.
"I hope this appalling violence will lead political leaders on all sides in Libya to understand the magnitude of the threat we face," said Sanalla. "I encourage them urgently to put aside their differences. We need to unite against this common enemy, not tomorrow or next week, but now."
Rival governments in Tripoli and Tobruk, a coalition of jihadists called the Shura Council of Benghazi Revolutionaries, and IS have all been vying for control of Libya since the disintegration of a peace agreement that was reached after the death of former dictator Muammar Qaddafi.
Related: On the Frontline of Libya's Fight Against the Islamic State
Experts said two scenarios are at play in the fight.
In 2014, IS declared its worldwide caliphate to possess three provinces in the country, with the city of Sirte serving as the terror group's headquarters.
If IS gains control of Libya's oil industry, it will possess sufficient revenues — even though they would likely only sell oil within the country — to consolidate power, said William Braniff, executive director of the National Consortium for the Study of Terrorism and Responses to Terrorism at the University of Maryland.
"This may be the economic capability that allows the Islamic State to be a persistent problem in Libya," said Braniff. "It's a game-changer when an organization is self-funded, controls territory, and is able to subjugate a population. We are seeing that in Iraq and Syria. An entrenched presence is hard to tackle."
Watch the VICE News documentary Libya: A Broken State:
At the same time, the United Nations is now brokering negotiations with the three non-IS factions in the Libyan civil war in hopes of forming a unity government that could bring peace and stability to the country. Those talks have yielded a power-sharing agreement that is supposed to result in a unity government in the next week or two. A key part of that agreement is how the factions will divvy up oil revenues. Libya has the largest oil reserves in Africa.
By destroying or crippling Libya's oil industry, IS might scuttle the power-sharing agreement.
"It just really makes the agreement between those rival groups mute," said Martin Reardon, senior vice president of the Soufan Group, a security and intelligence consultancy. "It undermines the potential for a unity government. It undermines the potential for these rival militant groups of the Islamic State to come together. It throws a wrench into things."
Related: Bombing the Islamic State's Oil Isn't the Slam Dunk You Might Expect It to Be
The UK has reportedly sent 1,000 special forces troops to Libya to help the country stop IS. If the power-sharing agreement becomes a reality, Britain, Italy, and other European countries might send an additional 5,000 troops to the country to help the new government survive.
Usually, IS would welcome a chance to kill European troops on the soil of a Muslim country, said Reardon. In this case, however, ruining the UN-sponsored power-sharing agreement would likely keep the Europeans out, giving the militants more time to set up their new government based on an ultra-orthodox interpretation of Sharia law.
No matter which scenario occurs, the outcome is the same: IS becomes master of a country that's around 300 miles from Sicily — a distance desperate refugees without oil wealth traverse all the time. Libya is also adjacent to Tunisia, a rare democratic country in the Arab world, and to Egypt, the most populous Arab country, which is ruled by a relatively stable military government.
"That's what we need as the international community to be trying to prevent right now," said Braniff.
Follow John Dyer on Twitter: @johnjdyerjr