Libya’s ability to reclaim its role as a reliable supplier of crude depends on the fate of a pair of oil ports on the war-ravaged country’s coast. Es Sider and Ras Lanuf have changed hands twice this month as rival military groups have battled over them. The two ports hold almost half of Libya’s capacity to export oil from onshore terminals, and the country’s ability to sell abroad affects prices globally.

Libya’s oil ports have been a focus of competing political forces since central authority collapsed after the 2011 ouster and killing of strongman Muammar Qaddafi. Es Sider and Ras Lanuf are especially valuable because they are the main outlets for crude pumped at fields in Libya’s interior. When operating normally, Es Sider can export as much as 340,000 barrels a day, while Ras Lanuf can ship 220,000 barrels a day. Located in Libya’s so-called Oil Crescent along its central Mediterranean coast, the terminals together account for 47 percent of the total capacity of the country’s onshore oil ports. Whoever controls them has a grip on Libya’s most important source of income.

The ports were badly damaged in fighting in December 2014 and closed for 21 months. The National Oil Corporation reopened the terminals in September, but they stopped shipping cargoes abroad this month because of the latest hostilities. The export halts have had a knock-on effect on oil production: storage tanks at the terminals become full, pipelines feeding them back up with crude, and fields that produce the oil must curtail output. The new round of fighting over control of the ports starting in early March curbed the country’s oil production but left the facilities almost undamaged.