Cash for family health services fell in real terms last year despite overall spending on the NHS topping more than £12 billion in Scotland.

Operating costs amounted to £12,026,998 in 2017-18,  a 1.5% real terms increase on 2016-17.

But new data from the NHS showed a real-terms decline in spending on the family health sector – which includes GP services, prescription drugs and dental and ophthalmic services.

Opposition politicians warned GP surgeries have reached “crisis point”, with the share of NHS  spending devoted to family doctors falling from 7.3% in 2013-14 to 6.8% this year.

This is despite a Scottish Government pledge that funding for primary care will increase to 11% of the frontline NHS budget by 2021-22.

Family health is the second largest area of NHS expenditure after hospitals, with the figures showing £2.6 billion  was spent on this in 2017-18, a drop of 0.4% in real terms.

Primary care  services at Scotland’s  959 GP practices in Scotland cost £822 million last year, a rise of  2.7% in cash terms on 2016-17.

Spending on Scotland’s hospitals amounted to £6.6 billion last year – a rise of 0.1% in real terms  – with this sector amounting for 55% of NHS costs.

Community health services, such as district nurses, health visitors and GP out of hours care, cost £2.4 billion – a real-terms increase of 4.8% on 2016-17

This increase was in part “due to the inclusion of £250 million, allocated to supporting integration of health and social care”, the report noted.

The Royal College of Physicians of Edinburgh warned: “For the NHS to survive financially, a proper funding plan must be in place.”

A spokesman for the RCPE said: “The cost of running the Scottish NHS rose to £12 billion in 2017-18, indicating that we are spending around £1.5 billion more than we were five years ago.

“Taking inflation into account, we see a 1% cost increase, in real terms, on 2016-17.

“A range of factors may explain this increase, including people living for longer with multiple health conditions, costs associated with new drugs and treatments, funding to facilitate the integration of health and social care, and increasing staff costs. ”

Liberal Democrat health spokesman Alex Cole-Hamilton  said SNP “mismanagement has brought GP surgeries to crisis point”.

“A quarter of practices now have vacancies, up from just 9% in five years,” he said.

“I have uncovered posts that have been vacant for two years and doctors have warned they are under pressure like never before.

“Scottish Liberal Democrats demand better. The Scottish Government must end the underfunding of general practice and put a mental health practitioner in every surgery, easing some of the pressure on GPs and ending the scandal of poor access to mental health treatments.”

Health Secretary Jeane Freeman said the figures showed “good progress to our twin track approach of record investment coupled with reform in health and social care services”.

She said: “Importantly, we are continuing to see an increase in the balance of expenditure in primary care and community services from our acute sector.

“This is in line with our efforts to bring more services into the community so that people have better options closer to home, and do not need to spend time in hospital if they do not need to be there.

“Driven by reform and extra investment, we remain on track to deliver more than half of frontline NHS spending in community health services by the end of the parliament.”

Ms Freeman added: “Investment in primary care has gone up every year under this Government.

“By the end of this parliament we will have invest an additional £500 million per year in primary care, £250 million of which will directly support general practice.

“This is helping see almost half of health service spending be invested in community health services for the first time.”