Scottish councils face a 17% gap between the cost of meeting demand for services and available funding over the next five years, according to a new report.

The Local Government Benchmarking Framework, which reports on council performance, said budget restraints were already beginning to impact on some services.

It said there was a trend of cuts for services that had become busier, with libraries, museums and leisure facilities losing funding despite rising attendances.

The number of pre-school and primary places in Scotland also increased by 30,000 and attainment improved, despite a 7% reduction in the education budget.

The report was published amid a stand-off between councils and the Scottish Government over the local government funding settlement for 2016/17.

Scottish councils absorbed a 5.2% reduction in spending between 2010/11 and 2014/15 through prioritising services and improving efficiency and productivity, the report said.

All service areas apart from social care experienced real-terms spending reductions of more than 5%, with roads suffering the heaviest cut of 27%.

The report said: "The striking trend across Scotland is that this financial tightening has not reduced service to the public or the impact of services."

It cited a rise in attendances at leisure facilities, libraries and museums of more than 20% despite a 15% real-terms cut to spending on culture and leisure.

In the past year public satisfaction with schools fell from 81% to 79%, while satisfaction with social care dropped from 55% to 51%.

The report said: "In the last 12 months... there is evidence that the ongoing budget constraints are beginning to impact upon some service areas.

"With more severe budget reductions from 2016/17 onwards, it should not be casually assumed that these improvements will simply carry on.

"Many efficiency and productivity gains have been taken already and further gains will be much harder to achieve."

It added: "Our best estimate of the impact of demand and costs pressures across the period to 2020/21 is that a gap of over 17% will open between the cost of meeting demand on current service models and the funding available to councils."

Councillor David O'Neill, president of local government body Cosla, said: "These trends show that even at a time of reducing resource councils have continued to deliver as best they can and have protected communities to the very best of their ability.

"Sadly the latest cut looks like being a step too far. However, as always we will continue to do our very best for the communities we are elected to represent."

A Scottish Government spokeswoman said: "Councils need to understand how they are performing in order to continue to identify and introduce improvements while maintaining the quality of their services and improving outcomes for their communities.

"The value of benchmarking is in how councils use it to continue to refine the way they work, make best use of resources and to improve outcomes for local people."