Legislation which aims to effectively end homelessness in Scotland by the end of this year has been passed by MSPs.
The change entitles anyone finding themselves homeless through no fault of their own to settled accommodation.
It meets Scotland's historic 2012 homelessness commitment, first set 10 years ago by the Labour/Lib Dem government.
Deputy First Minister Nicola Sturgeon said it was Europe's "most progressive" homelessness legislation.
Ministers said the new policy would be in force from 31 December.
Previously, homeless people with "priority need", such as families with dependent children, had the accommodation entitlement from local authorities, but that has been extended to anyone finding themselves "unintentionally homeless".
The change, passed unanimously under the Homelessness (Abolition of Priority Need Test) (Scotland) Order 2012, will give an estimated 3,000 more people a year the right to settled accommodation.
Ms Sturgeon described the move as "the most progressive homelessness legislation in Europe" - homeless households will no longer be subject to a test of whether or not they are in priority need.
"Local authorities, their partners and the Scottish government have worked closely to ensure that the 2012 homelessness target is achievable," she said.
"This has meant focussing efforts on prevention, so less people are actually reaching the point of homelessness."
Official figures from February 2012 suggested the number of homeless people in Scotland is at its lowest for a decade.