Scotland faces "real challenges" in recruiting GPs over the next decade, the First Minister has acknowledged, as she announced funding of £27 million to train more doctors, nurses and midwives.

Nicola Sturgeon set out measures to boost access for students to the medical professions on the day it was revealed 53 GP practices have been forced to bring in restrictions on patient numbers.

It's reported nearly a quarter of surgeries in some parts of the country are refusing new patients as they struggle to fill vacancies.

Opposition politicians described the investment as a "drop in the ocean" in the face of a growing recruitment "crisis".

The funding includes more than £23 million to increase the number of medical school places by 50 and £3 million to train an extra 500 advanced nurse practitioners.

A new entry-level programme will be launched for secondary-school students from deprived backgrounds as well as a Scottish graduate-entry programme in medicine that will offer to pay fees for students who agree to work in the Scottish NHS after qualifying.

The First Minister also announced a £1 million fund for nursery and midwifery students experiencing financial difficulties as well as a commitment to continue bursaries for nurses and midwives.

Speaking at Queen Margaret University in Musselburgh, East Lothian, Ms Sturgeon said investment in the workforce was vital to ensure the health service was fit to cope with the pressures it faces as a result of an ageing population and to ensure the success of the ongoing integration of health and social care.

She said: "We need to make sure that we are training the right numbers of professionals - in and across different specialities - with the skills they need for the health service of the future.

"That's why this additional funding of £27 million is so crucial in ensuring in ensuring the NHS in Scotland remains robust, resilient and ready for the challenges of the 21st century."

The Scottish Government has already pledged £60 million to help reduce pressure on GPs by having them work more closely in multi-disciplinary teams.

Ms Sturgeon said: "We already know the next decade will present real challenges for us in recruiting GPs. Many of our current GPs are due to retire and an increasing proportion will choose to work part-time.

"What we need to do is take action now to address that and that's why we've increased the number of GP training places from 300 a year to 400 and we're trying to encourage former GPs who have perhaps left the profession to care for children or elderly relatives to come back."

She added: "We've got to recognise the demographics of the profession as well as the increasing demand.

"That's why we're doing the increase in the places to get more GPs trained and into the system. Also within medical training there are steps afoot to encourage people to look at general practice as an option rather than necessarily going into another specialism."

Scottish Liberal Democrat health spokesman Jim Hume said: "This is a recruitment crisis that the First Minister is only just waking up to and how fortunate just before an election.

"This is a rushed response to what she knows are ticking time-bombs but will not provide additional resources immediately.

"This investment is a drop in the ocean that will not deliver what's needed so desperately on the ground."

The additional investment was welcomed by Professor Derek Bell, president of the Royal College of Physicians of Edinburgh.

He said: "Widening participation in the medical profession is a key element in addressing the future challenges of the NHS.

"We must ensure that a career in medicine is open to all those with ability and not restricted by factors such as socio-economic status."

Theresa Fyffe, Royal College of Nursing (RCN) Scotland director, said: "The First Minister demonstrated an awareness of the crucial role that today's nurses play in delivering health services in hospitals and across our communities.

"The package of measures she announced will help to ensure that future generations benefit from the unique skills and knowledge that members of nursing teams bring to health services and to their patients."