Twenty minutes' drive from Shanghai's glitzy financial district, dozens of migrant workers are preparing to abandon homes in old shipping containers, as one of the more unusual solutions to China's housing shortage faces the wrecking ball.
Cheap but crowded neighborhoods are being cleared across China as part of a stepped-up "urbanization" campaign by China's new leaders. The country aims to spend an estimated $6 trillion on infrastructure, including housing, as a projected 400 million people become urban residents over the next decade.
But in an ironic twist, the clearance of so-called "villages within cities" removes cheap housing stock for the very people targeted to fuel that migration, without providing sufficient replacement units. The land is sold by municipalities to developers who generally erect expensive apartment towers.
That throws into question how the government can achieve its ambitious goal.
"On the one hand, the law doesn't allow former farmers to expand housing for migrant workers, on the other hand local governments don't have the money to build affordable housing either," said Li Ping, senior attorney for Landesa Rural Development Institute in Beijing.
About 130 million Chinese migrants live in tiny, sub-divided rooms rented out by former farmers whose villages have been swallowed by sprawl, according to government surveys.
Policies to provide government-built housing while razing these shabby "villages within cities" result in a net loss of housing units, according to urban planners and academics, while choking off the private rental market that for decades has enabled China's massive urban migration.
The dilemma poses harsh choices for those who have made lives in the cities on the slimmest of margins, such as the migrants in the converted shipping containers in Shanghai.
"They can't just come and ask me to move. I have so many products here that I sell. So much stuff worth at least tens of thousands of yuan," said Li Yanxin, a migrant from nearby Anhui Province who runs a small convenience store out of his container. His profits - and therefore his ability to pay for his teenager's education - depend on the low rent he found in the container village.
Local officials put muscle behind a policy of clearing such sites, often declaring these dwellings illegal by noting non-agricultural land allocated to villagers cannot be used for commercial purposes. Land reclassified as "urban" can be sold at a huge profit.
"Not everyone can live in a high rise. Especially those of us who work in the recycling business," Zhang Baofa, who rented out the used shipping containers in one of the more creative solutions to Shanghai's shortage of cheap housing.
Local officials, embarrassed by photos of the container village circulating on the Internet, have vowed to remove the site within days. On Thursday, after four years of operation, they declared Li's store to be unregistered.
"This is zoned as village land. I borrowed the land. I bought the containers. I rented it out. I would know if it were illegal," Zhang said.
Separate and Unequal
Chinese cities lack the visible slums of other developing countries, thanks in part to communities such as Xinzhuang in Beijing that collectively house about 3.4 million migrants just within the capital.
A high whitewashed wall and strip of green lawn hide Xinzhuang's 10,000 residents from surrounding luxury apartment blocks. Three black chickens scratch along a filthy gutter of blue-grey water next to the public latrine. Rooms of about 12 square meters each house families of three, for an affordable 500 yuan ($80) a month.
(Read More: Elite in China Face Austerity Under Xi's Rule)
"A regular apartment would be more comfortable, but it's about 2,000 yuan a month. That's too much for the type of people who live here. They want to save what they can. We fill the lowest niche," said landlord Dong Gang, whose former farmhouse is now a two-story concrete structure divided into about 30 makeshift rooms.
One of the 1,000 original residents of Xinzhuang, he has been renting to migrants for 20 years. Complicated zoning laws mean that Dong can't expand beyond the footprint of his original home, hindering investments that might improve housing quality.
"In Beijing over the last two years they've been 'cleaning up' crowded tenements - that raises rents and forces many out," said Hu Xingdou, a specialist in migrant issues at the Beijing Institute of Technology.
Within the next two years, Beijing city is expected to allow migrants to rent but not buy city-built housing units. Even so, many migrants won't qualify to rent, and the number of government-built units often falls short of the number of migrants displaced.
"There is going to be less of this type of housing, because almost all cities have policies now to demolish 'villages within cities'," according to estimates by Tom Miller, author of "China's Urban Billion".
For two decades, Chinese local governments have been able to ignore the problem of housing migrants, thanks to the makeshift villages and other arrangements that accommodate about 40 percent of migrants. The remainder live at factory dormitories or tents and pre-fab housing set up on construction sites.
As China's cities and export industries boomed, cheap private housing helped keep down the cost of labor, says Li Jinkui of the China Development Institute in Shenzhen. He estimates Shenzhen would have spent 25 years' worth of annual revenues to house the people who were renting in its "villages" in 2000 - a population now estimated at 5 million people.
Of 1.35 billion Chinese, 690 million are estimated to live in cities, but only about half of those can claim urban residency status due to an archaic national registration system that ties all citizens, and public benefits, to their hometowns.
City governments often lack figures for how many people live in neighborhoods targeted for demolition, but they can document their destruction with precision. Beijing's most recent city plan notes that 171 "villages within cities" had been "cleaned up" in the previous five years, but as of 2011, there were still 100 left.
The loss of affordable housing could accelerate, according to a Beijing plan released Thursday to catalogue "illegal" buildings on collectively owned land and then destroy them next spring. Coal briquettes burned in unheated slum villages contribute to Beijing's choking winter pollution.
European and American cities had huge programs to replace slums with public housing, Miller said. "The question is what happens when they are demolished in China?"