A deal to reform European farm subsidies has been hailed as good news for Scotland.
The deal was struck after three weeks of talks
An agreement was reached by European Union agriculture ministers after three weeks of talks.
The compromise will abolish most of the subsidies that reward farmers according to how much food they grow.
However, individual countries will be able to keep some of the food subsidies to avoid farmers abandoning the land.
That waters down the original plan to get rid of all payments which encourage over-production and are blamed for causing the EU's surplus food mountains.
Speaking to BBC Scotland, Rural Development Minister Ross Finnie said: "It is a very good deal for Scottish agriculture.
"It is also a very good deal for Scotland as a whole in the sense that it also allows us to proceed to the WTO (World Trade Organisation) talks which I think have a wider ramification for Scotland."
Mr Finnie said a number of options had been agreed which could be introduced at regional level.
"In the consultation which will take place between the Scottish Executive and the industry we will be able to discuss whether in all the circumstances they might wish to take advantage of some of this flexibility," added Mr Finnie.
"This is the biggest reform of the Common Agricultural Policy and it effectively breaks the link between subsidy and production."
NFU Scotland president John Kinnaird also welcomed the agreement.
He said: "At last we have a deal and it is something we can move forward with.
"It is a very very good deal, primarily because we have got regionalisation. That is crucial for Scotland."
However, he said there was "a lot of concern" about the impact of the agreement on the dairy sector.
"That is one of the parts that is very important to Scottish agriculture, but the detail there we do not believe has gone far enough as far as the dairy sector is concerned."
He said the union would be discussing this, along with the rest of the deal, with the Scottish Executive.
As ever the devil will be in the detail
Mr Finnie described the outcome of the talks as "unfortunate" for the dairy sector.
However, he said "quite draconian" measures had been whittled down during the talks.
"I do think that negotiating away what could have been a much more substantial reduction has been a major success for us," he said.
Scottish National Party rural affairs spokeswoman Roseanna Cunningham also welcomed the agreement and said the greater flexibility was "vital".
But she warned: "As ever the devil will be in the detail.
"I will be paying particular attention to whether this will mean better news for organic farmers, a sector which we should be actively promoting, and how we can assist dairy farmers who will be extremely worried at the potential of a drop in intervention prices."