Hundreds of anti-GMO (Genetically Modified Organisms) activists and Greenpeace activists protest after uprooting genetically modified mais plants, on May 2, 2014 in a field near Roquettes

After years of fractious talks, EU states have finally reached a compromise to allow cultivation of genetically modified (GM) food crops by giving their opponents an opt out, official sources said Wednesday.

European Union member states will have the right to refuse GM crops on their territory, even if they have got clearance on health and safety grounds at the EU level, the sources said.

Reassured on this count, France, which has led the campaign against GM foods, plus Britain and Germany had dropped their opposition to the agreement, they said.

In principle, EU approval should mean that all member states have no further say in the matter but in the face of intense opposition from France, other states and environmentalists, companies seeking GM approvals have been stalled for years in Brussels.

As a result, US agro-chemical giant Monsanto abandoned efforts to get new approvals last year, saying it was no longer worth the effort.

Officials said the compromise means that when a company now applies for GM clearance, a member country can cite objections other than health and safety, such as concern over its impact on the environment or law and order issues, so as to be excluded from the EU approval.

"The compromise in the end offers more guarantees to the anti-GM countries," one EU diplomat said.

This arrangement will also offer "a fairly solid legal guarantee" against possible future court action by a company seeking to grow its GM crops in the EU, the diplomat said.

Non-GM member states will however have to allow the transit of GM products through their territory.

Cultivation of GM foods stokes widespread suspicion in the 28-nation EU on health and environmental grounds.

GM crops, however, have won repeated safety approvals and are imported into the EU in large amounts for animal feed.

Several GM crops have won EU approval but only Monsanto's MON810 maize is still grown after it was first cleared in 1998, with two other corn types plus BASF's Amflora potato abandoned.

The compromise agreement will go to environment ministers for approval on June 12.