Almost 5,000 children in Scotland were homeless and living in temporary accommodation at the end of last year, according to official figures published on Tuesday which campaigners described as “simply unacceptable in the 21st century”.

The number of homeless children staying in council houses, hostels and B&Bs stood at 4,876 on 31 December 2015, a 13 per cent increase on the year before, the quarterly statistics released by the Scottish Government showed.

Housing campaigners and opposition politicians said it was the third year in a row that the number of homeless children had risen in Scotland and called for a major building programme. Labour said the SNP had turned “a housing shortage into a housing crisis”.

Graeme Brown, director of the charity Shelter Scotland, said many homeless children were now staying in temporary accommodation for long periods. Describing this trend as “extremely worrying”, he called on ministers to do more to solve the problem.

“At the heart of these statistics is Scotland’s housing crisis and the thousands of families and individuals who lost their homes last year,” he said. “Along with the 150,000 households on council waiting lists, this is further evidence of the need for a political commitment to a major house building programme to deliver 12,000 new affordable homes each year for the next five years.”