* Big farms the main losers in sweeping subsidy shake-up
* End of EU sugar quotas from 2017 set to boost exports
* Links between output and payments seen as backward step
* Some issues remain unresolved, but won't block deal (Adds details, French farm minister quote, background)
By Charlie Dunmore
BRUSSELS, June 26 (Reuters) - European Union negotiators agreed on sweeping changes to the bloc's Common Agricultural Policy (CAP) on Wednesday including liberalising sugar production from 2017 to boost exports and cutting subsidies to the largest farms.
The deal brokered by representatives of EU governments, the European Parliament and the European Commission will determine who gets what in divvying up 50 billion euros ($65 billion) a year in farm subsidies between 2014-2020.
The biggest losers will be many of Europe's largest and most productive farms in countries such as France, Germany, Spain, and Italy, who currently receive the most generous payments.
That is because of a change in how entitlements are calculated, replacing the current link between farm payments and historical production levels in favour of subsidies based on the size of agricultural holdings.
The present system disproportionately benefits those who had the largest output in 2000-2002 such as industrial-scale grain producers in France's Paris basin.
Large farms could lose up to 40 percent of their current subsidies in some cases, but negotiators agreed to give governments the option of limiting the losses to 30 percent.
"We have a deal in principle on CAP reform between the negotiators, which must now be confirmed by the European Parliament and EU governments," EU farm commissioner Dacian Ciolos said after the deal was struck.
Ciolos said he did not foresee any problems with approval by governments and the parliament, which is necessary before the deal takes effect, given that it was within the limits of a negotiating mandate agreed by EU farm ministers in Luxembourg on Tuesday.
As part of the deal, EU sugar production quotas will end from October 2017, officials involved in the talks said.
The 45-year-old system of national production limits and minimum beet prices has been blamed for creating artificial sugar shortages in Europe and limiting EU exports because of world trade rules on unfair subsidies.
Negotiators agreed that 30 percent of all future direct subsidies, which account for about three-quarters of the annual CAP budget, should be conditional on farmers' taking steps to improve their environmental performance.
That will include leaving 5 percent of their arable land fallow as a haven for wildlife - a share that could potentially increase to 7 percent from 2017.
Farm groups have said forcing farmers to take land out of production could damage Europe's food security, but green campaigners criticised negotiators for weakening the proposed environmental measures in the final agreement.
Under the deal, some countries including France will be allowed to link up to 15 percent of direct subsidies to output levels in some regions.
The move is designed to help maintain production in areas where farmers face natural or other constraints, such as dairy farms in the mountainous region of central France.
Critics said the move represented a backwards step compared with previous CAP reforms in 1992, 1999 and 2003, which sought to break the link between production and subsidies that was blamed for creating Europe's wine lakes and butter mountains of the 1980s and 1990s.
But French farm minister Stephane Le Foll said the decision was the right one.
"The logic of liberalism did not win. On the contrary we managed to turn the situation around," he told a news conference in Paris.
France, Europe's top agricultural producer, will continue to scoop the largest share of CAP funds at around 8 billion euros a year, followed by Spain and Germany each with about 6 billion annually.
Several crucial issues remained unresolved and outside the scope of the agreement, negotiators said. They will instead be decided in parallel talks on the EU's long-term budget for 2014-2020.
They include a proposal to limit annual payments to large farms to 300,000 euros, which the Commission and parliament want to make mandatory but that governments insist should be optional.
Failure to agree on some elements would not prevent the wider package of reforms from entering force from next year, EU officials said. ($1 = 0.7649 euros) (Additional reporting by Nigel Hunt in Luxembourg, and Gus Trompiz and Sybille de La Hamaide in Paris; Editing by Foo Yun Chee and Anthony Barker)