New training for midwives could help prevent mothers-to-be from becoming homeless.
It is hoped the "groundbreaking" initiative will help midwives spot the signs that may indicate a woman in their care is at risk of losing her home.
A special training package has been launched by the housing and homelessness charity Shelter Scotland and the Royal College of Midwives.
The charity said that at the end of June 3,293 households were in temporary accommodation, which included either pregnant women and or children.
There are almost 2,400 midwives in Scotland, with the new training designed to raise awareness among them of the health problems that can be associated with someone losing their home. It also covers the definitions of homelessness and the duties local councils have to house pregnant women and their families before and after a baby is born.
Midwives will also be given specific guidance on how to help pregnant women who are forced to flee their home because of domestic abuse.
Gillian Smith, director of the Royal College of Midwives in Scotland, said the training is a "vital resource to educate midwives about the warning signs of homelessness amongst pregnant women".
She said: "We look forward to working with Shelter Scotland on this ground-breaking initiative."
Shelter Scotland director Graeme Brown said midwives are in a "prime position" to spot the warning signs for homelessness among the women they care for.
He said he hopes the scheme could be rolled out to other health professionals.