Legislation aimed at providing more support to farmers has been passed unanimously at Holyrood.

The Agriculture and Rural Communities (Scotland) Bill will require ministers to prepare a five-year rural support plan, dealing with the details of support for farming, forestry and rural development.

The Scottish Government will also be able to create a support framework and provide financial assistance to farmers.

The Bill was backed by 115 MSPs, with none voting against it.

After the legislation was passed, Rural Affairs Secretary Mairi Gougeon said: “Our vision for agriculture sets out how the government will support farming and food production in Scotland to become a global leader in sustainable and regenerative agriculture.

“The Bill provides a future framework that will help deliver this vision, supporting farmers and crofters to meet our immediate and long-term food needs sustainably and to adapt to new opportunities and challenges.

“It will enable the delivery of support schemes that will ensure that agriculture continues to play its part in cutting emissions, mitigating climate change, enhancing nature and biodiversity, together with food production.

“Our food and farming sectors have a critical role to play in a sustainable, resilient food system.

“As we transition to a new framework of support, we will do this in a way that is just, that ensures no cliff edges in support and by taking our agricultural industry and rural communities with us.”

Eleanor Kay, senior policy adviser on agriculture and climate change at Scottish Land & Estates, commented: “This Bill presents a crucial opportunity to create legislation that is fit for Scotland.

“There is clearly lots of work still to be done for agriculture to transition to the new agriculture support, however farmers need to take action now to be in the best position to take advantage of the new schemes.

“Scottish Government must work with stakeholders to overcome any challenges holding back the development of the future policy and support framework in Scotland, ensuring that we use diverse expertise to develop a coherent and sustainable future policy,“ she continued, adding: “We remain concerned that communication to the sector on future support is not sufficient and more must be done by the government to ensure true co-design of policy.

“We firmly believe that extensive consultation will be required for the secondary legislation associated with the Bill and are reassured that Scottish Government has acknowledged this in the passage of the Bill.”

NFU Scotland’s director of policy Jonnie Hall said: “This legislation is vital as it enables Scotland, in a post-Brexit, post-CAP era, to develop its own approach to future policy and support.

“We have been clear from the start; the Bill must have flexibility and scope to deliver for farmers and crofters across Scotland and much of what we sought is included is in the Bill.

“A profitable, sustainable agricultural industry is key to Scotland’s ambitions and having the powers to deliver the right support is crucial. Powers are one thing; it is how those powers are used that matters most.

“With the primary legislation in place, the task of developing and implementing the new support framework can really begin; getting this right is critical.

“Farmers and crofters must be recognised and rewarded for actions they take, and incentivised to enable change to improve the resilience, efficiency and profitability of the agriculture sector.”

Don't miss the latest headlines with our twice-daily newsletter - sign up here for free.