Ministers have been accused of performing a U-turn over staffing of hospital departments, after shortages of doctors left some areas nearing breaking point.

NHS managers have slashed hundreds of training posts in recent years, under a policy led by former health secretary Nicola Sturgeon who said she wanted to reduce reliance on trainees in favour of a service delivered predominantly by fully trained doctors. The Government said the overhauled model would provide better outcomes for patients and be safer.

However, it has emerged training posts across Scotland are to be increased this year in a number of under-pressure areas, many of which were previously identified as priorities for health boards to make cuts in trainee numbers.

Emergency medicine, acute medicine, anaesthetics and mental health are among the specialities that will see increases in trainee posts, despite previously being singled out as areas with a heavy reliance on junior doctors.

Last night, senior Government insiders insisted there had been no shift in policy, saying trainee numbers were now growing in line with increases in the overall medical workforce.

However, guidance issued to health boards in 2009 stated trainee numbers would fall up to 40% by 2014 and asked them to plan for the significant cuts in junior doctor numbers, while increasing numbers of specialist doctors and consultants.

Dr Richard Simpson, Labour MSP and shadow minister for public health, said increasing trainee numbers following years of cuts amounted to a "spectacular U-turn" and signalled that the previous policy had failed.

"I have no idea what the SNP policy on workforce planning is. It's shambolic," he said. "They seem to be going hand to mouth, but it takes 10 years to train a consultant, you can't just switch the taps on and off. The process needs steady planning."

Earlier this week, Health Secretary Alex Neil said he was hoping to attract more foreign doctors to Scottish hospitals in a bid to plug staffing gaps in areas including A&Es. While available training posts in emergency medicine are among those to increase from August, just 48% of advertised posts were filled last year.

In December 2012, the health secretary said the number of training posts in Scotland had dropped by more than 200 over the previous four years, as part of a move from a service delivered by trainee doctors to one delivered predominantly by trained doctors. However, numbers are to rise by 58 from the 2014-15 academic year.

Tom Berry, a surgical registrar in the west of Scotland and deputy chairman of British Medical Association Scotland's junior doctors committee, said the Government's policy of cutting trainee numbers in favour of achieving a service delivered increasingly by qualified doctors had been based on a sensible principle. However, he said in some areas, appropriate levels of consultants had not been recruited to replace falling numbers of juniors.

A spokeswoman for the Scottish Government said: "It is important to ensure that NHS Scotland has a balance between a highly skilled workforce, with a trained doctor cohort, while ensuring we can continue to encourage trainees to come and work in Scotland.

"This has always been our approach and will continue to be, ensuring Scotland's NHS workforce can meet the challenges of providing high quality, sustainable healthcare.

"The National Reshaping Medical Workforce Project Board provides advice on the number of speciality training posts necessary to balance supply with anticipated future demand. Additional core training posts in emergency medicine, anaesthetics and mental health have been agreed this year, with additional posts also created in a number of other specialities, including acute medicine, geriatrics and paediatrics."