The Scottish Government has been urged to admit there is a national shortage of NHS staff, after vacancy rates for both doctors and nurses have reached their highest level since 2007.

Simon Barker, chairman of BMA Scotland's consultants committee, said the ministers needed to "get real about how many vacancies there are".

He said: "We need serious steps in Scotland to make working as a doctor an appealing career choice and show doctors they are valued."

Official figures show the country is short of more than 4,000 nurses and midwives and more than 500 consultants.

At the end of June 2019 the NHS in Scotland employed the equivalent of 140,327 full time staff. But 513.9 'whole time equivalent' medical and dental consultant posts were vacant.

The British Medical Association Scotland said: "The truth is simple - we just do not have enough doctors."

Of the vacant consultants' posts 265 have been lying empty for six months or more, with the overall vacancy rate reaching 8.8 per cent in June – up from 7.6 per cent the previous year and the highest since September 2007.

The vacancy rate for nurses and midwives meanwhile increased to 6.3 per cent of posts, compared to 5.3 per cent in June 2018, making this also the highest since September 2007.

At the end of June there were 4,013 unfilled nursing and midwifery posts that – with 1,009 of these jobs having had no-one in place for more than three months.

Health Secretary Jeane Freeman defended the figures, claiming the SNP Government had seen NHS staff numbers rise.

"Staffing has risen by almost 10 per cent under this Government to historically high levels and is projected to continue to rise in the coming years", she said.

But Simon Barker, the chairman of BMA Scotland's consultants committee, said the Scottish Government needed to "get real about how many vacancies there are".

He called for a series of changes to better value doctors and encourage more young people into the profession: "That means focused efforts on recruitment and retention, improved work-life balance, and reversing years of real-term pay cuts.

"The Scottish Government has instead chosen to rely on temporary and more expensive locum staff to plug gaps and shore up services."

Such a model is unsustainable, he said.

The message from the head of nursing union RCN Scotland was the same. Theresa Fyffe, RCN Scotland Director said: "Only last week Audit Scotland highlighted the Scottish Government’s failure to model future demand and address workforce pressures.

“The number of nurses and healthcare support workers in both our NHS and care home sector is simply not keeping pace with the number of people they are expected to care for. Our members repeatedly tell us that there isn’t enough of them to do their job properly.

“The Scottish Government must not lose sight of this workforce challenge. Scotland needs more nursing staff, we need more people to want to become nurses, and we need to have policies and working conditions that support nursing staff to stay in the profession.”

Opposition politicians also demanded action, with Conservative health spokesman Miles Briggs claiming: "The SNP's dismal workforce planning over more than a decade has brought us to this disastrous point."

He added: "The Nationalists cannot pretend that 4,000 missing nurses and 500 vacant consultant posts – in a country the size of Scotland - is anything other than a full-blown crisis.

"For years Nicola Sturgeon has been warned about an ageing and expanding population, as well as a workforce who, on average, are edging ever-closer to retirement. Yet her Government has done nothing and now patients are suffering."

Labour health spokeswoman Monica Lennon said: "The workforce crisis in NHS Scotland is deepening, heaping pressure onto already overworked staff.

"The SNP Government promised that things would get better for staff and patients under Jeane Freeman - it has only got worse."

Alex Cole-Hamilton, Liberal Democrats health spokesman, argued: "Persistent vacancies across the NHS are making life difficult for diligent NHS staff and it's affecting patient care.

"The SNP Government has made a mockery of NHS staffing and are still postponing the long-awaited workforce plan.

"The result has been increase upon increase in vacancies across the NHS with staff being forced to pick up the slack in under-resourced teams."

But Ms Freeman said: "NHS staffing has risen by almost 10 per cent under this government to historically high levels and is projected to continue to rise in the coming years.

"We recently passed our new safe staffing legislation to help plan and recruit our workforce to meet the changing health and care needs of the people of Scotland long into the future. We've supported this by increasing training places for medical students and for nursing students."

She said the Scottish NHS was built on the dedication and hard work of its staff. She added: "In contrast to the actions of the UK Government for the health service in England, we've protected free nursing and free midwifery tuition and not only kept their bursary but we are increasing it to £10,000 from next year."

"We're doing all we can to try and mitigate the appalling impact that a no-deal Brexit poses to recruitment to our health and care services, and as a consequence the impact on people who rely on those services."