* Libyan oil output at highest level for five years
* Risks loom as oil workers complain about high inflation
* Militias and protesters have blocked ports and fields
* Production remains below 2011 levels
By Ayman al-Warfalli, Ulf Laessing and Ahmad Ghaddar
BENGHAZI/TRIPOLI/LONDON, Nov 30 (Reuters) - Libya's oil output is at a five-year high and rare exploration deals with foreign majors are being won but worker dissent and ever-present armed groups risk a repeat of disruptions that have choked off other production surges since the 2011 civil war.
Staff at state oil firm NOC told Reuters that small protests had erupted at nine oil and gas fields and some ports in recent months, mainly among workers left waiting for promised pay rises as inflation and a weak currency erode living standards.
"We are the anonymous soldiers whose rights have been stolen," said a worker at the al-Intisar oil field, asking not to be named as NOC has banned workers from talking to the media.
"We should be the best paid workers in Libya but we suffer from poor accommodation and medical treatment in the fields and delays in salary payments." Other staff made similar comments.
The most stable period of production in the North African country since 2013 has pushed output as high as 1.3 million barrels per day. State oil firm NOC has restarted wells shut for years as security has improved in some areas, while oil majors like BP have said they will revive long-delayed exploration plans.
But approaching or exceeding output of 1 million bpd has tended to be a psychological trigger for demands from workers and militia groups that also want a share of oil earnings.
In autumn 2014, blockades of oilfields and ports rapidly cut production after it had climbed to more than 800,000 bpd. In May, disruptions slashed output to around 150,000 bpd, its lowest since the war.
Before 2011 Libya was producing around 1.6 million bpd.
Seven years after Muammar Gaddafi was toppled, the OPEC member also remains mired in conflict between rival governments and armed groups.
NOC said in a statement it was always looking to improve conditions for its workforce and called on the government to approve a pay rise. But years of underfunding and destruction by militias had forced it to focus on damaged infrastructure.
"NOC is constantly having to redeploy budget to restore critical infrastructure; funds that could otherwise be spent on facilities and improving working conditions," NOC said.
Libya was once one of Africa's richest countries but living standards for ordinary citizens have declined as the local currency has lost value. The dinar has fallen on the parallel market by as much as 400 percent against the dollar since 2014.
Since even basic foodstuffs like milk have to be imported, inflation has soared, hurting oil workers whose salaries have not risen since 2013. Authorities then agreed a 67 percent pay hike but volatile oil revenues meant it was never implemented.
Priced for its proximity to key European markets and crude quality, Libyan oil has recently been in demand as a substitute for Iranian crude hit by U.S. sanctions.
Part of the technical work needed to keep oil and gas fields going is done by NOC's foreign partners and specialist services firms, an oil executive said.
But NOC staff need to be kept happy as they make up the bulk of the industry's workforce, operate oil export ports, and are often alone at remote fields where poor security makes oil majors wary of sending their own staff.
Oil workers' protests have been small and shortlived. But in Libya with its dysfunctional state, pipelines have sometimes been blocked by 20 workers or fewer, industry sources said.
Many Libyans see NOC, which generates billions of dollars annually, as a cash cow that is potentially more responsive to their grievances than the largely absent state.
Armed groups have also enjoyed an oil bonanza. By forcing the weak state to hire their men, they gain access to cheap central bank dollars to sell on the black market at a premium.
One such group, the Petroleum Facilities Guards (PFG), is in charge of securing facilities. In September some PFG members halted air transport to the Wafa oil field in what NOC said was an attempt to extract a "corrupt" contract.
NOC workers make between 800 dinars ($205) and 3,000 dinars a month -- more than the average public servant. But frustration has been building up over a lack of investment in living quarters or medical units.
In September, oil workers at NOC's eastern Zueitina port demanded health insurance in a letter to management.
NOC said it had approved medical coverage for all staff last year and instructed subsidiaries to proceed with the policy, after the audit bureau suspended health insurance in 2015.
Other staff are tired of having to work in dangerous places such as the El Sharara oilfield, deep in the south, where gunmen have kidnapped or robbed workers.
"The security situation on the El Sharara field is very dangerous," said one frightened engineer.
Tribesmen have threatened to close the field unless they get a share of oil revenues, a recurring theme while Libya is divided between rival governments relying on armed groups and tribes.
"Libya needs a comprehensive political settlement before situations like the one we have at Sharara can be resolved," a Libyan oil source said.
NOC hopes to increase production further if security improves but analysts remain sceptical.
"With production at a five-year high, the production risks are more on the downside ... considering the ongoing political instability in the country and the challenging security situation," said Giovanni Staunovo, analyst at UBS in Zurich.
Writing by Ulf Laessing; Editing by Catherine Evans