Homeless people living in cars and motorhomes across the US are being joined by a new breed: the middle class.

As mortgage foreclosures continue to rise, growing numbers of middle-class professionals are losing their homes and downsizing from four bedrooms to four wheels.

With numbers rising, New Beginnings, a homeless agency in Santa Barbara, California, has launched a safe parking scheme, whose aim is to provide a refuge of sorts for those who have nowhere to go other than their vehicle.

Guy Trevor lost his job as an interior designer when the sector contracted thanks to the foreclosure crisis. With his furniture sold and his belongings in storage, he now lives in his car, spending the nights in one of the 12 gated car parks in Santa Barbara run by New Beginnings.

"I see myself as a casualty of a perfect storm," he said. "The people sleeping at the [car parks] are ... just like me. They come from normal, everyday homes. I think a lot of people in this country don't realise that they, too, are a couple of pay cheques away from destitution."

In normally affluent Santa Barbara there were 150 foreclosures last month, with a total of 800 for the year ending in May, according to the county assessor's office, which assesses property for tax purposes.

Each month, an auction of foreclosed properties is held on the steps of the Santa Barbara courthouse.

"The way the economy is going, it's amazing the people who are becoming homeless. It's hit the middle class," Nancy Kapp, of New Beginnings, told CNN.

Another of Kapp's clients, Barbara Harvey, 67, also lost her job and subsequently her home thanks to the foreclosure crisis. As with Trevor, her job as a loans processor was connected to the housing market.

Harvey now lives with her three dogs in her car, parking at night in a women-only car park run by the agency. "I didn't think this would happen to me," she said. "It's just something that I don't think that people think is going to happen to them."

The rise in the number of homeless people sleeping in cars has led to a clampdown in Los Angeles. In common with many US cities, it is illegal to live in vehicles on public streets. This year the city banned almost all overnight parking on residential streets. A first violation receives a $50 (£25) fine, while subsequent offences carry fines of up to $100.

"For more working class and lower middle class people, the car is the first stop of being homeless, and sometimes it turns out to be a long stop," Gary Blasi, a University of California, Los Angeles, law professor and homelessness activist told the Associated Press.

The city has the highest number of homeless people in the US, with an estimated 73,000 living rough. A survey last year of more than 3,000 of them showed that 250 were sleeping in their cars.