Annual spending on NHS temporary staff in Scotland has risen to a record high of more than £560m - a rise of over a third compared with the previous year.
Latest data shows that in the year up to 31 March, £447.4m was spent on bank and agency nursing and midwifery staff.
Another £119.6m was spent on locum doctors and dentists.
The largest health board, NHS Greater Glasgow and Clyde, spent close to £130 million in the previous year to address the shortage of nurses and midwives.
While the NHS workforce has grown by more than 10 percent in the last decade, the data shows more people left than joined the service in the past year.
In 2022–2023, there were 13,946 new employees; however, 14,089 employees left the company, leaving a difference of 143.
The Royal College of Nursing said more than 4,000 registered nurse posts across Scotland remained vacant at the end of March, equating to 8.5 percent of posts. .
Agency staff used to fill the gaps rose to the equivalent of 1,741 in 2022/23, up from 1,018 in 2021/22.
The nursing trade union said the cost was a "staggering" £169.7m, up 91 percent from £88.8m the previous year. It said the spend on agency staff two years ago was £39.3m.
The union said overall spend on bank and agency staff combined was up 39 percent on the previous year, to £447.4m.
Eileen Mckenna, RCN Scotland's associate director, said the "thousands" of missing registered nurses was impacting on the safety and quality of patient care.
She said the shortage was "putting even more pressure on staff who are already working extra unpaid hours to cover gaps and going home feeling that they are unable to provide the quality of care they want".
Ms Mckenna added that while some investment in bank and agency nursing would always be needed, it was "not the solution to the workforce crisis", while the huge increase in spending was "simply not sustainable".
The Scottish government's decision to line the pockets of the private sector rather than to invest in the growth and development of the nursing workforce within the NHS, according to our members, is shocking, she said.
"This is clear evidence that the new Nursing and Midwifery Taskforce must deliver positive change to address persistently high nursing vacancies. ".
Ms Mckenna added that the taskforce needed to look at how Scotland could retain experienced nursing staff, develop new routes into the profession and ensure nursing was "a career of choice once again".
The number of nursing and midwifery staff dropped by 0.9 percent to 64,642, with £277.7m spent on bank staff - who provide basic clinical care to patients - to cover that area.
There was a 1.9 percent rise in the number of medical and dental staff to 5,913, with nearly £120m spent on agency locums.
The number of allied health professionals, who provide a range of diagnostic, technical, therapeutic and support services, rose by 4.5 percent to 13,462.
A Scottish government spokesperson said the workforce was the "most important asset of the NHS" and staffing had grown by more than 17 percent in the last decade.
The spokesperson highlighted a record number of trainee doctors recruited last year, plus a 55 percent increase in the number of available medical school places at Scottish universities in the last eight years.
"These annual figures are the first to show additional staff brought in during the pandemic, such as for Test and Protect services and vaccinations, leaving the workforce," the spokesperson added.
"Spending on agency nursing increased during Covid as boards relaxed some controls on temporary staffing to ensure enough staff were available to keep wards, patients and staff safe.
"New controls have now been put in place and we expect to see agency costs coming down. ".
The spokesperson stated that the government was committed to making the NHS "an attractive place to work," pointing out that some employees receive "the best pay in the entire UK.
Nurses, midwives and paramedics were among NHS Scotland workers offered a one-off payment and an average salary rise of 6.5 percent from April this year.
Dr Sandesh Gulhane, the Scottish Conservatives' shadow health secretary, said the "shocking figures" and "seemingly unstoppable rise" in agency staff spending was a "shameful reflection of the nationalists' appalling workforce planning and mismanagement".
Dr Gulhane, a former doctor, blamed the dependency on more agency or locum staff on the government's "failure to ensure there are enough permanent frontline staff to properly resource our health service".
"It's the ultimate false economy," he added. "Every penny is a prisoner given the huge demands on the NHS, so we can't afford to spend ever-increasing sums on fees to agencies, in addition to paying the temporary staff they provide.
"Some of this locum spending will have even gone towards permanent staff or retirees begged to take on extra shifts in order to plug the enormous staffing shortfall. ".
. "