In a city that gets younger by the day, Beijing's historic courtyard homes have long been seen as worthless relics that too often find themselves on the wrong end of a bulldozer.
But a surge of interest by investors, especially foreigners, is providing a new lease on life for the former homes of the ancient city's nobility and elite merchants.
Australian lawyer Tom Luckock has bought two neglected siheyuan -- or "four-sided courtyards" for their orientation around a central space -- within the past year, restoring their former glory with a modern yet historically faithful renovation.
"I could have bought a flat in a new apartment block, but you're just buying a piece of air in a dodgy building when you could get a piece of history," he said.
Thousands of the single-story homes were built in the neighborhoods surrounding the Forbidden City, former home of China's emperors and now a vast museum in the center of Beijing.
With their courtyards, threshold carvings and up-sloping eaves, the siheyuan recall the languid grandeur of China's last dynasties.
They have dwindled, however, as first the Communist government and now profit-minded property developers have sought to remake the ancient city.
Estimates of the number remaining range widely from a few thousand to as many as 15,000, all tucked off the maze-like residential alleyways where local vendors still roam, touting such services as knife-sharpening in sing-song fashion.
After years of apparently rampant destruction to make way for wider roads, commercial developments and modern apartment blocks, experts say the siheyuan are now coming back into vogue.
Accelerating sales have pushed prices up from between 6,000 and 10,000 yuan (US$780 to US$1,300) per square meter five years ago to as high as 40,000 to 60,000 yuan today, said Yuan Chengguo, a property agent specializing in siheyuan.
One sold last month for US$14.3 million, which state media called a record. Among the famous names that now own siheyuan are media mogul Rupert Murdoch.
Foreigners, led by Americans and Japanese, are betting on further investment gains as the 2008 Olympics approach, while others have been lured by a landmark new law offering more protection for private property owners, agents say.
"Foreigners are getting more and more interested and make up about half of our clients now," Yuan said.
But plenty of patience and cash, as well as a strong stomach for risk are required.
It took Luckock over two years to land the first property, since many are occupied by several separate families, a major obstacle to deal-making.
"There's no way you'll get 10 or 12 families to agree on a price," Luckock said.
He has paid cash -- about 4,000 yuan per square meter for the first property of 190m2, and more than twice that for the second one -- since Chinese banks do not offer mortgages on siheyuan.
He bought the second property in his girlfriend's mother's name to avoid foreign-ownership restrictions, then spent four months removing a group of illegal squatters.
Then there's the risk, ever-present in Beijing, that the government or developers could exploit murky land-ownership rules to take over properties like his for a song.
But in reusing as much of the original bricks, roof tiles and woodwork as possible, he has unearthed bits of history, including bricks bearing imperial seals and 1960s Cultural Revolution-era slogans such as "oppose imperialism" and "reject revisionism."