Councils spent £3.5bn on temporary housing in last five years
Councils in Britain have spent more than £3.5bn on temporary accommodation for homeless families in the last five years, data obtained by the BBC shows.
In that time the annual cost has risen 43%, with councils spending £851m on temporary housing in 2015 alone.
Homeless charity Crisis said the number of people in temporary accommodation was rising at an "alarming rate".
The government said temporary housing "ensures people have a roof over their head".
But the Local Government Association said the costs were "unsustainable".
Temporary accommodation is provided to households that councils accept are homeless, but the criteria for who is eligible varies between nations.
This includes bed and breakfasts, hostels and private rented accommodation.
Most of the cost - and the increase - has occurred in the overheated London housing market, figures obtained by the BBC through the Freedom of Information Act show.
Almost two thirds of the £3.5bn (61%) has been spent in the capital, while 85% of the increase in costs since 2011-12 also occurred there.
Just 10 London boroughs accounted for two thirds of the total increase in spending over the past four years.
Scotland spent more on temporary accommodation (£750m) than England when London is excluded (£578m).
'I wasn't in arrears for anything'
Lucy Surridge has spent nine weeks living in a hostel in Dagenham, east London, with her 11-year-old daughter and six-year-old son.
A full-time school chef, she was made homeless when her landlady sold the property.
The 29-year-old approached several estate agents but they told her she would need to earn £38,500 before they would consider renting to her.
She was told she would also need £3,500 in deposit, fees and the first month's rent.
"I think everyone thinks 'it'll never happen to me'.
"I made sure I paid all my bills on time - I wasn't in any arrears for anything.
"But even that didn't secure me from being evicted and having nowhere else to go. You get priced out of being able to move on."
Total spending by Scottish councils has remained fairly constant since 2011-12, at around £150m a year.
While the number of homeless people in Scotland has fallen slightly in recent years, a lack of stock is leaving families staying in temporary accommodation for longer.
In Wales £45m was spent over the period, with annual spending decreasing by 26% over the five years from £9m to £7m.
The fall in Wales coincides with a change in policy in the country that has seen a dramatic reduction in the number of households accepted as homeless, with councils working harder to prevent tenancies ending.
In 2014 Wales passed a Housing Act that put more responsibility on councils to prevent homelessness rather than placing people in temporary accommodation.
Figures for Northern Ireland have been excluded, as the country has a different system for temporary housing.
"More and more people are finding themselves in desperate circumstances," said Jon Sparkes, chief executive of Crisis.
"Prevention is better than cure, and for homeless people this is especially so.
"It has already been shown to work in Wales. We now need similar change in England.
"The Homelessness Reduction Bill currently making its way through Parliament aims to do just that."
The data shows the housing crisis is most apparent in England.
English councils, including those in London, have seen their costs rise by almost 60%.
While councils will be refunded for some of the costs - for instance through housing benefit or by charging some tenants rent for their temporary properties - many local authorities say they are increasingly having to subsidise temporary accommodation.
The Local Government Association, which represents councils in England and Wales, said: "Many councils are struggling to cope with rising homelessness and to find suitable accommodation for those in need.
"The increasing use of temporary accommodation is not only financially unsustainable for councils but is making it increasingly difficult for them to spend money on preventing homelessness, and is disruptive for those families placed in such accommodation."
A spokesman for the Department for Communities and Local Government said: "Time spent in temporary accommodation ensures people have a roof over their head and the number of households in temporary accommodation is well below the 2004 peak.
"This government has invested £500m to tackle homelessness - including prevention funding and £40m for councils to help rough sleepers.
"We are also backing Bob Blackman's [MP] Homelessness Reduction Bill, which will also provide vital support for many more people."
Temporary housing in London's poorest borough
The housing crisis has left London's poorest borough, Barking and Dagenham, unable to house London's poorest people.
Over several days, we saw first-hand the pressures facing Barking and Dagenham Council's housing team.
Dozens of people stream in daily, many having been evicted hours earlier.
All are desperate for help.
For the over-stretched staff, each case requires a dispassionate response.
Alex Watkins Morgan, a frontline housing officer at Barking and Dagenham council, said: "A lot of these people are in crisis point.
"They're losing their home, they do not know what their next step is going to be.
"They're in a place in their lives where don't know what to do and they're hoping we've got the answer.
"And we haven't always got the answers."
Many people are turned away - healthy single people, EU citizens who cannot prove they have been working, those who are deemed to have become intentionally homeless, such as by building up rent arrears.
Families with no rent arrears, savings or indeed options are the most likely to be supported.
The council's budget for temporary accommodation this year has already been spent, five months early, but the pressure remains intense.
A council rule that banned officials from housing people more than an hour from the borough was dropped on Tuesday - it was unsustainable.
Darren Rodwell, leader of Barking and Dagenham council, said: "We're now saying there are people in our community that we can no longer facilitate. And I never got into politics to say to people, I can't help you anymore."
The relaxation of where people can be placed could see families placed in the Midlands or northern England.
The council is in discussions with several areas about using their funds to regenerate empty, cheaper areas miles from London.
They want to build sustainable communities, the council leader told us, not dump people far from home.
They are also building houses, regenerating areas, opening short-term hostels - striving to regain control over a costly, broken system.