Hundreds of farmers have not received EU subsidy payments from 2015, the rural economy secretary has said.

Speaking to MSPs on Tuesday, Fergus Ewing revealed a new Scottish Government loan scheme for farmers.

This was described as "an admission of failure" by Conservative MSPs.

Ewing apologised as he admitted the troubled new IT system set up to deliver Common Agricultural Policy (CAP) payments was "not there yet".

He said arrangements for the payment of 2016 subsidies were "not risk-free" as he announced eligible farmers and crofters would be able to apply for a loan up to the value of 80% of their entitlement.

Ewing confirmed that as of last Friday, 17,744 out of 18,479 eligible businesses had received 2015 payments, with "the majority of outstanding cases" expected to be paid by the October 15 deadline.

He said: "There is much we have already learned from this first year of the new CAP payment regime and this experience will help to smooth the 2016 process.

"However, some parts of the programme are still being added and developed and will feature for the first time in 2016.

"Our contractor CGI has assured me that the IT system functionality for 2016 will be delivered early next year and final processing will be undertaken thereafter.

"I therefore expect and anticipate that payments will be made and substantially completed between then and by the end of the payment period, namely by the end of June."

He added: "I'm confident that we're putting the 2016 payments on a better footing.

"I'm also reassured that the arrangements we have put in place with our contractor mean that they should be able to deliver on the time-scale they have committed to for payments.

"But those arrangements are not risk-free and frankly these are not risks I am prepared to take, particularly with families' and communities' livelihoods.

"I'm therefore announcing today that every farmer and crofter who is eligible for a basic greening or young farmer payment will be able to apply for a loan up to value of 80% of their entitlement."

Ewing said farmers who applied by the October 12 deadline would receive a loan in November giving them "security and certainty" and securing jobs and investment.

Government estimates suggested more than 17,000 businesses would be eligible, with the potential for up to £300m to be injected into Scotland's rural economy by the end of the year, he said.

Ewing said: "I want to reiterate what I said in May, that we're sorry that whilst we have made substantial progress we are not there yet but I remain absolutely committed and determined to fix this and I'm getting on with doing just that."

Conservative rural economy spokesman Peter Chapman MSP described Mr Ewing's statement as a "slap in the face" to farmers dealing with record levels of debt.

He said: "The minister has said today that we need certainty going forward but he has just confirmed what we all expected.

"The IT system still doesn't work and is not expected to work until well into next year, and that's why some £40m is still outstanding for this year's payments, nine months late."

He added: "That's why he can't deliver 100% of payments in December as we should expect and he has instead to offer an 80% loan. This loan is an admission of failure."

Labour MSP Rhoda Grant added: "In his statement to the parliament in May, (Ewing) set out his three objectives.

"They were to complete payments, to minimise penalties and deliver compliance and to set the 2016 scheme on a proper footing.

"It's clear from the statement that he hasn't achieved any of these."