Scotland's top prosecutor has been told MSPs have "fundamental concerns" about funding and resources for the Crown Office and Procurator Fiscal Service (COPFS).

Margaret Mitchell, convener of the Scottish Parliament's Justice Committee, said junior staff were being used as "court fodder" and the service had faced a decade of real-terms budget cuts.

With the budget shrinking again this year, the committee has heard 30 jobs may have to go "to make ends meet".

Ms Mitchell raised the concerns at Holyrood after the committee published a report on the COPFS which warned the system is under ''considerable pressure''.

The COPFS budget has been falling from a peak of £118.3 million in 2009-10, the report said.

Ms Mitchell said MSPs on the committee felt "staff resilience has been tested almost beyond endurance in recent years".

She added: "It should not be tested to breaking point."

After hearing from lawyers and others involved in the criminal justice system, Ms Mitchell said: "The picture which emerged was one of a long-hours culture, with junior staff being used as court fodder and prosecutors frequently facing totally inadequate preparation time.

"This was reflected in above-average sickness rates and returns from staff surveys indicating low morale - a clearly-worrying situation aggravated by the large number of temporary short-term contracts and temporary promotions."

She said there were "fundamental concerns about the adequacy of resources" and added: "The fact is that the Crown Office and Procurator Fiscal Service budget has seen a marked decline in real terms for a decade whilst at the same time demand and the number of complex solemn cases is increasing.

"This year the COPFS budget has declined further in real terms and the committee heard with growing concern that around 30 staff may have to be shed to make ends meet."

She continued: "The bulk of evidence gives the impression of the COPFS as just about managing and doing its best to prosecute against a backdrop of decreasing resources.

"While the committee has stressed that the public should have confidence in the COPFS as, on the whole, a robust, fair and rigorous public prosecutor, it none-the-less issues a stark warning - the strains are already showing."

She also told how MSPs on the committee "questioned whether the COPFS was fully meeting its legal and moral duty of care towards victims".

Lord Advocate James Wolffe QC said: "The service has sought to protect staff numbers, not withstanding real reductions in resource over a number of years.

"That anticipated loss of 30 staff should be put in context in this way - that in April 2017 the staff complement of COPFS was 1,599, which compares with 1,537 in March 2012.

"If one looks at the legal staff, the equivalent figures in April this year were 520 as compared with 485 in March 2012."

He also told MSPs he took "challenges" facing staff seriously

"The services values its staff," the Lord Advocate said.

"I listened to the evidence to the committee about pressures which the staff are under, and the service understands those pressures, which is precisely why over time it has sought to protect staff numbers."

Scottish Conservative justice spokesman Douglas Ross said staff at the prosecution service feel "let down" by Scottish Government budget cuts of £1.5 million in real terms in this financial year.

While he said witnesses had praised the professionalism and dedication of COPFS staff, he added that "many people accustomed to working at the front end of the system argued that a lack of resources was impacted on the COPFS's performance."

Labour's Claire Baker called for action to address the "serious failing" that some victims' experiences of taking a crime to court including delays, poor communication and misinformation led them to say they would never have reported the crime in the first place.