CAIRO (Reuters) - Libya’s largest oil field and a second major field in the southwest began shutting down on Sunday after forces loyal to military commander Khalifa Haftar closed a pipeline connecting them to the coast, the National Oil Corporation (NOC) said.

The closure, which comes after a blockade of major eastern oil ports, risked taking nearly all the country’s oil output offline as international leaders met in Berlin for a peace summit on Libya.

Libya has been producing around 1.2 million barrels per day (bpd) of oil in recent months, and all major fields lie in areas controlled by Haftar’s eastern-based Libyan National Army (LNA).

The NOC said guards under LNA command had shut down the pipeline leading to the coastal city of Zawiya on Sunday, forcing the corporation to limit oil production at the Sharara and El Feel oil fields.

El Sharara, operated by the NOC in a joint venture with Spain's Repsol REP.MC, France's Total TOTF.PA, Austria's OMV OMVV.VI and Norway's Equinor EQNR.OL has production of around 300,000 bpd. El Feel, operated by the NOC and Italy's Eni ENI.MI produces about 70,000 bpd.

Haftar’s LNA has been waging an offensive since April to capture the capital, Tripoli. It is one of two main factions that international powers want to agree to a ceasefire in Berlin on Sunday.

Ahead of the summit, oil ports and oilfields in Libya’s east were shut down, closures that the NOC said were directly ordered by the LNA and would lead to the loss of 800,000 bpd.

The move was seen as a pressure tactic ahead of the summit, though the LNA has sought to portray it as the result of popular pressure.

Eastern groups aligned with the LNA have long tried to gain control over oil exports and revenues, which are channelled through the central bank and the internationally recognised government in Tripoli.

The Tripoli-based NOC, which says it is neutral and deals with all parties in Libya’s conflict, has warned that any shutdowns could have a lasting impact.

“The oil and gas sector is the lifeblood of the Libyan economy and the single source of income for the Libyan people,” NOC Chairman Mustafa Sanalla said on Friday. “They are not cards to be played to solve political matters.”