“If government doesn’t act now, then there is a very real risk that all the good work in tackling stroke, heart disease and some cancers in Scotland will be undermined.”

Health officials measured the body-mass index (BMI) of 39,056 five-year-old children. This is calculated by dividing a person’s weight in kilograms by their height in metres.

A reading of between 18.5 and 25 is normal, between 25 and 30 overweight and between 30 and 40 obese. To be classified as morbidly or severely obese requires a BMI of more than 40, at least 60 per cent more than what is deemed ideal.

The figures found that 21 per cent of five-year-old boys were overweight and 19.8 per cent of girls. Overall, 8.2 per cent of children were classed as obese and 4.1 per cent severely obese.

Children growing up in Scotland’s poorest families (22.2 per cent) were far more likely to be overweight than their peers living in the country’s richest communities (17 per cent).

The problem was worst in the Dumfries and Galloway (24.4 per cent) and Highland (23.9 per cent) health board areas, while it was least common in Lanarkshire (17.1 per cent).

Shona Robison, the Public Health Minister, said: “Whilst it is disappointing that the recent falls in the levels of obesity and overweight in P1 children have not continued, the slight increase seen in this year’s figures is not significant and the overall trend remains positive."

Meanwhile, SNP ministers came under more criticism after separate statistics show the number of nurses and midwives employed by the NHS has dropped by 548 to 68,133 over the past year.

In comparison, the number of administrators fell by 295 to 30,778. Jackie Baillie, Scottish Labour health spokesman, said: “These figures show that the SNP is getting its priorities badly wrong.”

But Nicola Sturgeon, the Scottish Health Minister, said there are 9,529 more clinical staff working in the NHS now than in 2006.