The NHS in Scotland spent a record £82m on locum doctors last year, an increase of £18m on the previous year, according to data obtained by BBC Scotland.
Although NHS Greater Glasgow spent the most on cover staff, it was the smaller boards which spent the largest proportion of their budget on locums.
Western Isles and Shetland spent a third of their entire medical staff budgets on locum doctors.
In Glasgow, the equivalent figure was just 4%.
You can also explore the locum data using the INTERACTIVE MAP developed by BBC Scotland.
In October the financial watchdog, Audit Scotland, warned NHS boards are facing increasing difficulty meeting their financial targets, with four boards requiring additional funding from the Scottish government to break even.
The review stated the reliance of many boards on locum staff to cover vacant medical posts exacerbated the problem.
But on BBC Radio's Good Morning Scotland programme, Shona Robison, the newly-appointed health secretary, said the Scottish government had put a great deal of work into establishing medical staff banks.
She said: "[This will] help boards to be able to fill the gaps when there's sickness, when there's maternity leave, some of the challenges that are there for our health service which, of course, is also treating a record number of people."
Ms Robison added that NHS Scotland faced an "international challenge" to fill posts, particularly in some specialities such as emergency medicine and paediatrics as staff often chose to go into other areas.
An earlier report from Audit Scotland in 2010 estimated NHS boards with higher locum doctor costs could save the NHS an estimated £6 million per year if they reduced their costs to the national average.
The report also expressed concern that not enough was being done to protect patient safety when locums hired through private agencies were unknown to the board and working in an unfamiliar hospital.
But the data, obtained by BBC Scotland through a series of coordinated freedom of information requests, reveals most boards have increasingly relied upon locums over the last five years.
Since 2009, NHS Tayside increased its spending on agency locums by 1080%; equivalent expenditure by Orkney and Borders has risen fivefold.
The cost of using agency locums is generally higher than for internal NHS locum doctors.
NHS Tayside Medical Director Dr Andrew Russell said: "NHS Tayside, like all other health boards, has experienced difficulty in recruiting to certain specialities such as paediatric, psychiatry and anaesthetic doctors due to a national shortage of doctors in these areas.
"Our locum expenditure has, in the main, been due to filling these gaps."
He said: "The use of locum doctors is always a position of the last rather than the first option and the decision to employ a locum doctor is always made by a senior doctor in the organisation."
A spokesman for NHS Grampian said locum doctors were "a necessary expense for any NHS board."
The board, which administers health services for the fourth largest population in Scotland, spent £6.6m on agency locums in the last year - more than the larger NHS Lothian.
In September it was revealed that NHS Grampian spent over £1,500 flying a doctor from Jamaica to Aberdeen to cover a shift for five weeks.
And in August, it spent more than £2,000 bringing a consultant from India to cover a weekend shift in accident and emergency.
A NHS Grampian spokesman said: "[Locum doctors] provide vital support to our full time staff complement and when vacancies arise in the medical staff group, locum or agency doctors are used to ensure continuity of service while we recruit."
But earlier this year the board told Audit Scotland of significant difficulty recruiting some groups of staff, including accident and emergency staff, blaming a buoyant labour market, competition for jobs in the local area and a national shortage of staff in certain clinical specialties.
NHS Grampian reported that consultant vacancies in oncology are affecting cancer services, and patients are having to receive treatment in other boards.
The British Medical Association says the staffing problem is much greater than official NHS figures suggest, because they do not include jobs which are waiting to be advertised, or posts in which an advertising drive has been unsuccessful.
Dr Nikki Thompson, Chairwoman of the British Medical Association's consultant's committee, said the problem lies not with training enough doctors for its needs but with attracting them into jobs.
"Anecdotally, colleagues involved in the appointments process tell me that it's not uncommon for jobs not to attract any suitable applicants at all," said Dr Thompson ahead of the latest release of NHS workforce statistics by the Information Services Division.
She added: "Also, because of increasing pressures on services, current consultant jobs don't offer a suitable work-life balance.
"So as well as failing to attract people, we're failing to retain the people we desperately need."
A spokesman from NHS Western Isles said the board has experienced particular difficulty in hiring a radiologist at a time of a "worldwide shortage".
"Smaller and more remote boards have even more difficulty as the pool of radiologists who want to work in a remote area is extremely small."
He added: "We have advertised many times with no success and as a consequence we have to rely on locum cover together with offsite reporting provided by a commercial company."
The BMA estimates 11% of consultant jobs are unfilled, compared to the government's vacancy rate of 7%.
And, according to the BMA, official figures do not account for the heavy reliance on locum doctors that boards use to cover vacant consultant posts.
The data collated by BBC Scotland shows NHS Dumfries and Galloway spent 14% of its medical staff expenditure on agency locums in the last year - despite having the highest consultant vacancy rate (15.4%) of all Scottish health boards.
The locum data also revealed:
- The largest single amount paid out by NHS Ayrshire was £1,400 for a single 8-hour shift by an agency locum;
- In 2013, NHS Borders paid an agency locum £5,573 for a 48-hour shift;
- The largest departmental expenditures for internal locums working for NHS Dumfries in 2013 were: general management (£455,602); general surgery (£281,000); orthopaedics (£149,000), and anaesthetics (£131,000);
- In 2013, the largest agency locum salaries paid by NHS Glasgow hospitals were: Inverclyde (£2,151,000); Royal Alexandra (£1,617,000); Southern General (£1,406,000), and Victoria hospital (£1,289,000).