The Libyan National Oil Company said Sunday production had resumed at Al-Sharara oil field, the country's largest, which had been shut months ago by the forces of strongman Khalifa Haftar.

Al-Sharara, about 900 kilometres (560 miles) south of Tripoli, produces 315,000 barrels per day -- nearly one third of Libya's crude output -- but is frequently attacked and blocked by militias.

In January, valves at a pumping station were closed forcing a halt in production at Al-Sharara and costing the treasury more than $5.2 billion, the National Oil Company said.

It came as forces of Haftar, who is based in the east of Libya, was pushing an offensive he had launched in April last year to seize the capital Tripoli from the UN-recognised government.

A statement from NOC said the company "confirms the return of production at the Sharara oil field in south of the country, after lengthy negotiations by the NOC to reopen the Hamada valve, which had been illegally closed last January".

The National Oil Company said that production will resume at a capacity of 30,000 barrels of oil per day until it reaches full capacity within 90 days, due to damage sustained from the shutdown.

"We hope that the restart of production at the Sharara oil field will be a first step to reviving the Libyan oil and gas sector and preventing an economic collapse in Libya in these difficult times," NOC chairman Mutafa Sanalla was quoted as saying in the statement.

Oil exports are the source of almost all state revenue in Libya which has the biggest proven reserves of crude in Africa
Oil exports are the source of almost all state revenue in Libya which has the biggest proven reserves of crude in Africa AFP / ABDULLAH DOMA

Oil exports are the source of almost all state revenue in Libya, which has the biggest proven reserves of crude in Africa.

Al-Sharara is run by the Akakus company, a joint venture between NOC, Spanish oil giant Repsol, France's Total, Austria's OMV and Norway's Stateoil.

Sunday's announcement came as fighters loyal to the UN-recognised Libyan Government of National Accord kept up a counter-offensive against Haftar's forces around the strategic coastal city of Sirte.

The central city and home of former dictator Moamer Kadhafi is key for access to Libya's crucial "oil crescent" in the east, where many oil fields are located.

The US embassy welcomed the resumption of production at Al-Sharara, hailing it as "a significant step forward" and urging all sides "to reject attempts to militarise the energy sector".

Libya plunged into chaos after the ouster and killing of Kadhafi in a 2011 NATO-backed uprising, with rival administrations and militias vying for control of the country and its oil wealth.

The situation has been exacerbated by the intervention of foreign powers, with Turkey backing the UN-recognised government and Russia and the United Arab Emirates supporting Haftar.