text: The National Union of Farmers organised the event as a protest about delays in distributing EU farm payments.
  It was changed to be about "wider rural economy and food chain issues" after the Scottish government pledged Â£200m to support farmers in the interim.
  Scottish ministers Richard Lochhead and John Swinney,  and Scottish Tory leader Ruth Davidson addressed the rally.
  Farmers have been hit by delays in processing Common Agricultural Policy payments due to problems with a Â£178m computer system set up to administer the newly-reformed system in Scotland.
  The Scottish government said 59% of payments have now been made.
  Some protestors called for Rural Affairs Secretary Mr Lochhead to resign, as he told them "we'll get the payments out, we'll fix the problems."
  He said: "While we have robust political debate inside the chamber, all political parties agree that food production in this country is an absolute priority.
  "Helping out our food producers in their hour of need, whether that's because of the issues we've had with payments or the weather, or because of low market prices, we have to do what we can to make sure that the skills you represent and the jobs you sustain and the support you give to Scotland is maintained going forward."
  Scottish Conservative leader Ruth Davidson urged the protestors to keep up the pressure on the government.
  She said: "If this had been an issue affecting urban Scotland it would have been solved months ago.
  "There's a real question of what happens now. There's still a real question over next year's claims, given we know the computer system doesn't work."
  Scottish Lib Dem leader Willie Rennie told the protestors that the Scottish government needed to "act quickly to get the money out the door", while Finance Secretary John Swinney told them "your voice has been heard".
target: Dozens of farmers gathered outside the Scottish Parliament for a rally highlighting rural issues.