* Total oil output reaches 562,000 bpd
* Es Sider port to start loading tanker on Tuesday
* Wintershall restarts production for Ras Lanuf port (Adds context, detail)
The country's oil industry is making a modest comeback, restarting production and exports even while Tripoli has become a battleground for rival armed factions amid the worst violence since the 2011 civil war.
Output has risen to 562,000 barrels per day (bpd), the state-owned National Oil Corp said on Tuesday, although still well below its pre-blockade level of around 1.4 million bpd.
Through a two-part deal completed in early July, a federalist rebel group agreed to end its blockade of four eastern ports
Production, which fell below 200,000 bpd in May, has picked up since the deal to exceed 400,000 bpd over the past month.
Exports are inching up, helping the crippled government cover its budget needs, after falling close to zero in June.
Germany's Wintershall, a subsidiary of BASF, has restarted production at the 220,000 barrel-per-day (bpd) Ras Lanuf terminal for the first time since protests ended in July, Ibrahim al-Awami, general manager of inspections and measurement at the oil ministry, told Reuters.
The resolution of the eastern protests and the election of a new parliament also helped stabilise the situation in the west, where other groups periodically shut down oilfields and ports.
In the eastern Es Sider terminal, the SC Sara tanker will be one of the first to load crude oil from storage at the 320,000 barrel per day Es Sider terminal on Tuesday, the market sources said.
Several more cargoes are expected to be shipped by companies with stakes in the Waha Oil Co, which runs the Es Sider port and connected oilfields, namely Marathon, Hess and Conoco. Austria's OMV is also expected to lift a cargo.
The port currently holds some 4.5 million barrels in storage, but once the tanks are emptied, the connected oilfields can restart production, officials said.
At the eastern Ras Lanuf port next to Es Sider, OMV was the first to load a cargo last week.
Wintershall's output is blended to produce the Sirtica grade, exported by the Harouge Oil Co, which runs the port.
"Sirtica oil started being pumped to Harouge Oil Co to Ras Lanuf two or three days ago," al-Awami said.
(Additional reporting by Feras Bosalum in Benghazi; editing by Jason Neely and Jane Baird)