Libya’s crude production dropped below 400,000 barrels a day as the conflict in the divided North African country cut electricity supply at oil fields, according to the state-run National Oil Corp.

Output in Libya, holder of Africa’s largest crude reserves, has been hampered by inadequate security and maintenance as well as power outages, said Mohamed Elharari, an NOC spokesman. Crude production was about 411,000 barrels a day in June, according to the most recent OPEC monthly report. BP Plc recorded $598 million in exploration write-offs and other costs in Libya in the second quarter, the company said Tuesday.

“The situation is not very good,” Elharari said Monday by phone from Tripoli. “There is poor maintenance, and there are electricity cuts at the oil fields.”

Libya produced about 1.6 million barrels a day before the 2011 rebellion that ended Muammar Qaddafi’s 42-year rule. The country is today the smallest producer in the Organization of Petroleum Exporting Countries. It has failed to restore output as militias fight for the control of export terminals while tribes and workers block operations at fields and pipelines to seek jobs and better pay.

Two Governments

The country has been split since last year between an internationally recognized government that operates from the east and an administration that rules over the capital Tripoli and most of the western region. Es Sider and Ras Lanuf, the nation’s largest and third-largest oil ports, have been shut down since December following attacks by militias loyal to the Tripoli government.

“There is no change to the situation at the ports,” Elharari said. “We are trying to re-open them, but so far there is no progress.”

BP, which in August declared force majeure in Libya, said “there is significant uncertainty on when drilling operations might be able to proceed,” in its quarterly results. Force majeure, a legal status protecting a party from liability if it can’t fulfill a contract for reasons beyond its control, remains in effect at both locations where BP was exploring, off the coast of Sirte and in the Ghadames North and South areas in the Sahara Desert, David Nicholas, a company spokesman, said Tuesday by phone from London.

Paris-based Total SA became the first major European group to take an impairment in Libya, writing off $755 million from its onshore assets, it said on April 28. Eni SpA, with headquarters in Rome, and Madrid-based Repsol SA haven’t yet marked down the value of their investments in the country.

Libya’s challenges in boosting crude production coincide with a global excess in supply over demand for the past five quarters, the most enduring oil glut since the 1997 Asian economic crisis, according to the International Energy Agency.