A seven-day limit is to be introduced on the use of temporary accommodation for homeless people in Scotland.
The change in regulations comes amid charity warnings that people were living in bed and breakfast rooms for over a year.
Currently, the limit on spending time in unsuitable accommodation currently applies to families and pregnant women but will be extended to everyone at risk of homelessness.
Following a Scottish government consultation on the change, 97% of respondents backed the move, with changes due to be implemented from May 2021.
Latest Scottish government figures also revealed that 36,465 people asked for help to find a home from their local council in 2018-19, up 3% on the previous year – with applications rising for the second after a period of consistent decline since 2005-06.
The figures also showed increasing numbers of people were also staying in temporary accommodation, such as B&Bs.
Housing Minster Kevin Stewart said the Scottish government was investing £32.5m in supporting local authorities to “prioritise settled accommodation for all”.
“We know that people living in these unsuitable environments can for too long often lack cooking or washing facilities, and some have reported that they cannot have visits from family or friends,” he said.
“These experiences have a detrimental effect on people’s physical and mental wellbeing, preventing them from rebuilding their lives.
“While temporary accommodation can offer an important emergency safety net for anyone who finds themselves homeless, such as those fleeing domestic violence, it should be a purely temporary measure.”
Jon Sparkes, CEO of homeless charity Crisis, added: “We strongly welcome the announcement that the Scottish government will change the law, so that people will no longer have to live in the most unsuitable forms of temporary accommodation for longer than seven days.
“This marks a major achievement for our Life in Limbo campaign, a three-year project which has sought to put an end to lengthy and dehumanising stays in unsupported hostels, hotels and B&Bs.
“This decision is a recognition of the resolve of our clients to shine a light on the inhumane conditions they were experiencing and the determination to ensure no-one else was subjected to these prolonged stays.”