The Scottish Government programme set up to process farmers' European Union (EU) payments continues to face "major obstacles" and is unlikely to deliver value for money, the Auditor General has said.

The programme, developed to deliver the EU's Common Agricultural Policy (CAP) payments to farmers, crofters and rural businesses, has been beset with lengthy delays, missed payment targets and rising costs, an Audit Scotland report found.

Opposition parties said the spending watchdog's findings revealed a "litany of failure" and "incompetence" as they called on new rural secretary Fergus Ewing to conduct a swift review.

The Audit Scotland report on the five-year IT scheme which began in 2012 found that although the system is working and began making payments in December 2015, there are still "significant defects" slowing down progress.

The Government admitted in March there is an "extreme risk" it will not make all the required payments by the European Commission's (EC) deadline of June 30.

Delays to payments also forced the SNP administration to offer loans to farmers through a £20m hardship fund earlier this year.

Originally estimated to cost £102m, the programme now has a final budget of £178m and a reduced scope.

At the end of March, it had spent £126m and funds could run out before the IT system fully meets EC regulations. Failure to comply may lead to financial penalties of between £40m and £125m, Audit Scotland said.

The report identified a number of problems with the programme's management, including "significant tensions between teams, confused governance and accountability arrangements, and a failure to deal effectively with a significant conflict of interest held by a contractor on the programme" who "could benefit financially from decisions he had an influence over".

Caroline Gardner, Auditor General for Scotland, said: "The CAP Futures programme has been beset with difficulties from the start.

"These problems, and the way they have been dealt with by the Scottish Government, are a serious concern, particularly as the programme continues to face major obstacles and is unlikely to deliver value for money."

Scottish Liberal Democrat MSP Mike Rumbles said: "Audit Scotland has uncovered a litany of failure and staggering incompetence dating back two years."

Scottish Labour's Jackie Baillie said: "The SNP need to make an urgent statement to parliament about this scheme and then conduct a swift in-depth review to identify and resolve the failures we have seen."

Deputy first minister John Swinney said that the farming industry was made aware that the payment timetable may have been changed.

Swinney said: "We have to look very carefully at all of the issues raised in the Auditor General's report.

"We have also been responsible for taking urgent action to remedy the situation - 82% of farmers have had a payment administered through this new IT system.

"So, the idea that this system doesn't work, I'm afraid, is nonsense.

"The industry was very clear with government that it wanted us to promote more options and more possibilities to be put into the scheme.

"We warned the industry in 2014 that if we did that it might jeopardise the timetable for payments, and the industry said to us that that was a price that they were prepared to pay because it would deliver a scheme more in their interests."

The deputy first minster also said that the possible £125m fine by the EU was news to him.

He said: " I don't recognise that number. Obviously it has to come out of public funds available to the Scottish Government if such a time arises, but I can assure the farming community this morning that the Scottish Government is 100% focused on ensuring that this scheme is compliant by the deadline of the EU.

"What I am absolutely renowned for is my focus on delivering the goods and I am focusing the government 100%, and the rural economy secretary will be focusing 100% likewise, on making sure that we deliver the scheme in a compliant fashion before June 30."