The Scottish Government has come under further attack over the "shambles" of delayed farming payments after "confusion" in the loan scheme set up by ministers to help cover the resulting shortfalls.

Rural Economy Secretary Fergus Ewing told MSPs that "regrettably" some farmers were mistakenly told they were entitled to less cash than they should be eligible for.

He insisted, though, that no-one would lose out as a result.

The Scottish Government announced the loan scheme in September after Mr Ewing admitted the troubled new IT system set up to deliver European Common Agricultural Policy (CAP) payments was ''not there yet''.

Letters inviting farmers and crofters affected by the delay in payments to apply for a loan were sent out at the end of September, with all those eligible for help expected to receive one by the end of this week.

Mr Ewing told MSPs at Holyrood: "Regrettably, after letters were sent, manual checking of a sample of the calculations uncovered an undervaluation of entitlement which affected some potential applicants.

"Clearly, this is regrettable and I appreciate fully it will cause confusion for those receiving letters. Revised loan letters will be issued to the affected farmers and crofters this week.

"However, I think it is important to note that no farmer and no crofter entitled to receive a loan will be worse-off as a result of this undervaluation."

Peter Chapman, a Tory MSP for the North East of Scotland, said: "The shambles continues. To be frank, you could hardly make it up."

Labour's Rhoda Grant questioned if the latest problem was caused by "another fault with the new computer system" while party colleague Neil Findlay said: "This appears to be the latest in a long line of shambolic Scottish Government IT project fiascos."

Liberal Democrat MSP Mike Rumbles said: "On Thursday morning Mr Ewing's officials told the Audit Committee of this Parliament that farmers had nothing to worry about and IT problems with the system were being fixed.

"By the afternoon we knew another shambles was in the offing as hundreds of farmers were left in the dark over their loan applications."

However, Mr Ewing told him: "I am absolutely delighted that my officials corrected this error, they spotted it almost immediately. No-one, not one farmer and not one crofter, will lose a penny piece as regards this matter."

While he said the loan scheme had been criticised by opposition parties at Holyrood, he insisted it had been "broadly welcomed" by farmers across the country.

Mr Ewing also said: "We are quite appropriately carrying out an internal investigation as to precisely what went wrong.

"I think it better to wait for the outcome of that, frankly, before one assumes, as Mr Rumbles did, that it of necessity related to the IT problem."