£40 million is to be made available to farmers in the form of small grants.

The cash injection will help farmers invest in items such as stock handling equipment and IT as well as areas such as animal health, genetics and performance, crop management and energy efficiency measures.

The Welsh Government is investing £20m in the scheme which will be co-financed by the European Union funded Rural Development Programme.

The government has said small grants will help farmers to improve their resilience and competitiveness and also help them reduce their carbon emissions.

Farmers will be eligible for financial support of up to £12,000 at a 40% grant rate over a four-year period.

Brecon and Radnorshire Liberal Democrat AM Kirsty Williams welcomed the announcement.

The Lib Dems had promosed a Welsh agriculture small grant scheme in their 2016 election manifesto and said the deal with Labour, which saw Ms Williams become cabinet education secretary, contained a commitment to support the scheme.

Ms Williams said: "We are passionate about protecting Wales’ proud farming tradition in order to safeguard food security, look after the landscape and natural environment. That is why the Welsh Lib Dems insisted a small grant scheme for farmers was introduced.

"The grants can be used for a wide variety of options, such as stock handling equipment and IT. I would urge all farmers in Wales to take a look at the scheme to ensure their business is getting the support it needs."

William Powell, Welsh Liberal Democrat rural affairs spokesperson and Powys councillor, said: "This is great news for Welsh farmers. I am delighted we are delivering on this important Welsh Lib Dem manifesto commitment. "Farmers representatives have consistently called for such a small grants scheme, to ease the burden of on farm investment and to drive up productivity in the sector.

"Too often Glastir has been a source of confusion and frustration for many farmers, and the Sustainable Production Grant is seen as benefitting only a small minority of farmers in Wales. That is why we included this small grant scheme in our manifesto and then insisted it form part of the Progressive Agreement.

"I look forward to it bringing real benefits to Welsh farmers, more important than ever in the challenging times ahead."