Debt levels in Scotland's farming sector have reached a record high, with the amount of money owed to banks increasing by almost £180 million in the last year.

At the end of May 2016 a total of £2.2 billion was owed to banks - a rise of £177 million on the previous year, and the seventh year in a row that debt levels have increased.

In addition to this, farms have an estimated £1.4 billion of liabilities from hire purchases, lease arrangements and money borrowed from family members and other sources, according to Scotland's Chief Statistician.

The figures, which show bank farm debt is the highest since records began in 1972, come after problems with a new IT system caused delays getting European subsidies to farmers.

As of August 24 there were 1,061 of 18,479 eligible businesses that had not received payment under the Common Agricultural Policy (CAP) scheme.

Conservative rural affairs spokesman Peter Chapman said the rising debt showed that "farmers the length and breadth of Scotland have been let down badly by the SNP".

The Tory said: "The rural economy was starved of hundreds of millions of pounds thanks to its mismanagement of vital CAP payments.

"Now we are seeing record debt levels, and it paints a very grim picture for the agricultural sector.

"There are many challenges across farming, not least volatile commodity prices. But when farmers needed the Scottish Government most, the SNP ministers failed them."

Liberal Democrat rural affairs spokesman Mike Rumbles said: "It is no surprise that farmers have been forced to increase borrowing. The shambles over Common Agricultural Policy payments mean it would have been a surprise if debt had not spiked.

"Thousands of farmers were forced to wait months to receive the money they were due. The bills did not stop arriving during this period.

"Hundreds of farmers are even now yet to receive their farm payments and there are huge concerns within the sector over what will happen next year, too."

He added: "The SNP have singularly failed to give farmers the confidence they need that these problems will be addressed and payments will come out on time next year. Farmers have lost confidence in the Scottish Government and given the year that many producers have had, it is hard to blame them."

The figures on farm debt were released at the same time as the Scottish Government announced the latest round of funding to help create and support new farming businesses.

This will see 35 businesses share more than £1.8 million, taking the total spent on the Young Farmers and New Entrants Start-up Schemes to more than £7 million, which has helped 140 farms across the country.

Money for the scheme comes from the European Union and the Scottish Government, with Rural Economy Secretary Fergus Ewing stating: "With the average age of Scottish farmers currently sitting at 58, it is vital that we provide support for entrepreneurs in the critical early stages.

"That is why I am delighted to announce a further £1.8 million in grant funding to support a further 35 new farm enterprises.

"This brings the total support from the EU and Scottish Government to over £7 million, supporting the development and creation of around 140 new farms all over Scotland."

A spokesman for Mr Ewing said the Tories and the Lib Dems were "making political points which are not borne out by the facts" on farming debts.

The spokesman said: "The willingness of our banks to continue to lend to farm businesses should be seen as a sign of strength and optimism, not weakness, allowing farmers and crofters to make long-term investment decisions.

"Their irresponsible claims - which are simply not backed up by the data - risk creating unnecessary worry and fear among Scotland's farmers and crofters.

"The Tories and LibDems are giving the erroneous impression that there is something different going on in Scotland compared to the rest of the UK. Yet since 2010, lending in UK agriculture, hunting and forestry has increased by 51% compared to 46% for Scottish agriculture.

"Indeed, the only people creating uncertainty and risk for Scotland's farmers are the Tories.

"We do not yet know what Brexit might mean for our rural economy in the medium or long term, nor do we have clarity on all EU funding streams.

"The only thing we do know is that the Tories' reckless behaviour will end all CAP funding for Scotland's farmers and rural communities, which is why we are exploring all options to protect our place in Europe."