The cost of providing free personal care for people living at home has increased by around 160% in less than a decade, new figures show.

Councils spent a total of £346.7 million in 2011-12, compared with £132.8 million in 2003-04.

The 161% increase is said to be in part due to a shift away from providing care for elderly people in care homes.

The figures from the Scottish Government also show an increase in the number of hours of care being provided.

Across Scotland an average of 381,700 hours of free personal care were provided to people in their own homes in each week of 2011-12, a substantial increase from the average of 226,000 hours a week in 2003-04.

The average amount of care received per person has also risen by more than an hour over the period, from 6.9 hours to 8.2 hours, suggesting that people receiving care at home have increasing levels of need.

The number of people receiving free personal care in their home increased from 32,870 in 2003-04 to 46,740 in 2011-12.

Over the same period there was a slight fall in the average number of long-stay residents in care homes who are aged 65 or over, from 32,070 to 30,750.

Before July 2002 people could be charged when they received personal care services, such as help with washing, dressing and eating.

The introduction of the policy meant people aged 65 and over could no longer be charged for receiving this help in their own home.

Others receive this help in care homes, with those assessed as being self-funders receiving a weekly payment of £159 towards their personal care, with a further payment of £72 available for those also needing nursing care.

Payments for free personal and nursing care cost local authorities £111.4 million in 2011-12, up from £86.4 million in 2003-04.

Labour health spokesman Neil Findlay said the increase in cost for free personal care shows "the challenges in dealing with an ageing population".

He said: "These figures are only going to continue to rise. Predictions suggest that by 2035 there will be almost 1.5 million older people in Scotland. That equates to the population of Edinburgh, Glasgow, Aberdeen, Inverness and Stirling combined.

"This is a demographic time-bomb that will heap pressure on our services if it is not addressed now and plans made for the future. We need a national debate about how we will look after and care for a growing elderly population.

"We want to be part of the solution and are happy to work with the Scottish Government to make sure these services are fair and sustainable for future generations."

Health Secretary Alex Neil said free personal and nursing care is "a vital universal benefit".

He said: "These latest figures show that this distinctive Scottish policy is touching the lives of more than 77,000 older people.

"These figures are a great example of the kind of improvements we can make to people's lives when we are able to take the decisions about what happens in Scotland here in Scotland.

"I believe it is only right that older people feel fully supported to live at home or in a homely setting within their own communities for as long as possible. Not only have we seen a 42% rise in the number of people receiving personal care at home in Scotland since 2003-4 but today's figures show that people are now receiving more time with carers each week.

"It has long been our policy to care for older people in their own homes, or in homely settings in the community, wherever possible. We want to avoid any older person having to stay in hospital unnecessarily because they couldn't be cared for properly in their communities. We are extremely focused on offering the intensive support they need, as well as continuing to shift in the balance of care towards providing care at home to enable them to live as full a life as possible.

"I am encouraged by today's figures that show we are on the right track. I look forward to building on this to achieve more for our older people through the integration of health and social care."

Free personal care was brought in by the Labour-Liberal Democrat Scottish Executive, with Lib Dem health spokesman Jim Hume saying his party is "proud to have introduced free personal care when we were in government".

But he said: "Providing a long-term vision of care for Scotland's ageing population is essential if we are to manage demand on our services.

"With Scotland's pensionable age population set to increase by 26% by 2035 while Scotland's working age population only rises by 7% over the same period, much more needs to be done to integrate health and social care in our communities."

Conservative health spokesman Jackson Carlaw suggested that the future of free personal care is "utterly unsustainable".

He called on the Scottish Government to say how it plans to continue to fund it, and other policies.

"Free personal care is an admirable enough policy but when you line it up alongside the SNP's other freebie pursuits, the overall picture is worrying," Mr Carlaw said.

"Free prescriptions to those who can well-afford them and complimentary bus travel for 60-year-olds who are still working jeopardises the future of free personal care.

"With Scotland's rapidly ageing population - a challenge we've known about for some time - this bill well in excess of £450 million will rise steadily. That is why it is so important for the Scottish Government to illustrate exactly how it intends to fund these policies over the next 10 years.

"Without that commitment, we have to reach the conclusion that the future of free personal care, particularly when other populist policies are being rolled out, is utterly unsustainable."