Figures obtained under Freedom of Information showed that health boards had spent almost £4.4 million in recent years on items such as extra wide beds, wider bedside chairs and wider wheelchairs.

And the Lib Dem's health spokesman Ross Finnie warned that could be the tip of the iceberg, as no figures were available for NHS Greater Glasgow and Clyde and NHS Lothian - Scotland's two biggest health boards.

The figures showed health boards have spent more than £1.3 million on extra wide beds suitable for obese patients, while bosses at NHS Fife spent £79,500 on larger tables for operating theatres.

The bill for longer versions of standard surgical instruments reached almost £60,000, while overhead gantry systems to lift overweight patients have cost just over £315,000.

Mr Finnie said: "Some of our health boards are spending millions of pounds on specialist equipment for obese patients."

He added: "It's well known that obesity increases the risk of heart disease, cancer and strokes. This already places a great strain on NHS resources. But now we can see just how much health boards have to spend to adapt hospitals for these patients."

Mr Finnie described obesity as being "Scotland's ticking time-bomb" adding that the most recent figures showed that a fifth or youngsters in primary one were obese.

And he warned: "If this is allowed to continue then the recent improvements in, for example, the level of heart disease will rapidly be reversed."

The Liberal Democrat MSP called on the Scottish Government to do more to tackle the problem and said: "There is clearly a huge personal cost attached to obesity, but these figures also show that there is a hidden cost to the NHS.

"The SNP Government must tackle this. Taking steps to stop our young people becoming overweight in the first place is obviously the best way forward.

"For instance, the £4.4 million currently spent by some of our health boards on equipment for obese patients could buy 150 PE teachers. This would help get more of our young people involved in sport at an earlier age, setting them up for a healthier lifestyle as an adult."