One of China's last walled cities, Pingyao, escaped demolition because the area was so poor.
By Louisa Lim
BBC correspondent in Beijing
Now it is cashing in on its ancient past, with 6m visitors tramping through last year to admire the tiled roofs and carved wooden facades of the 400-year-old houses.
The tourists only really started coming in earnest in 1997 when the town got World Heritage status.
Hotel owner Li Pingsheng says they have changed everything.
"The tourists have brought many good things to us," he said. "Many young people were unemployed, but now they're tour guides, or they run restaurants or hostels. Tourism gave us a livelihood, it gave us hope."
But now the endless streams of tour groups are bringing new problems.
The number of tourists has doubled in the past two years, and the authorities fear the influx could damage the old city.
So they are planning to move almost two-thirds of the town's 40,000 residents outside the city walls.
It is a move hotly contested by the older inhabitants, like 82-year-old Mr Zhang who sells antiques by the roadside.
"This has been my home for several generations. All my family lived within the city wall. I've lived here my whole life. None of us really wants to leave," he said.
And the tourists - who are meant to benefit from the plan - do not seem to support it either.
Bettina Spaunhorst from Germany, sipping freshly-squeezed apple juice in one of the Ming dynasty courtyard hotels that makes Pingyao so unique, said she feared the proposals would completely spoil the old city's character.
"I'm here because I wanted to see authentic Chinese life and that's what I get right now. But if everyone moves out, all the real people are gone, so it's just more or less annoying souvenir sellers all around. I wouldn't go here anymore."
Her breakfast companion, Miguel Rodriguez from Spain, agreed. He saw a real gap between what Western tourists look for and what Chinese people like.
"I think we search more for something original and more authentic, and they just look for something nice and clean and bright. It's [a case of] different perceptions. For me, it's completely spoiled when you see something like that. The feeling you have when you're just walking around here is that 150 years ago it was the same, more or less," he said.
And that is the real problem. Part of the quaintness comes from the fact that the town is unchanged.
But it also means living conditions for the inhabitants of the walled city have not improved either.
Few of them have running water and electricity is sporadic. Many of the town's inhabitants are keen to move out to better accommodation.
The schools, hospitals and government offices have already been relocated outside the city walls, meaning life is increasingly inconvenient for those who stay inside the walled city.
Li Huaming said he would like to move out. Perched on a rickshaw with his wispy beard, silk waistcoat and embroidered jacket, he looked like a relic of an earlier age.
Li Huaming makes his living posing for pictures with tourists
But he makes his money in a thoroughly modern manner - not pulling tourists around, but allowing them to pose with him for photos. And with an eye on future earnings, he declared himself in favour of the plan to move out the city's residents.
"It's a good idea. The streets of Pingyao are so crowded, even bicycles can't get through. The city's not managed well. If it was better managed, there'd be more tourists coming here. People here don't have any money. If they did, they'd move out of the town," he said.
And it is not just people from the town who are making a living from it.
One travelling minstrel came from far away to the old walled city. In song, he extolled the virtues of tourism.
But in Pingyao, it is a mixed blessing.
Foreign tourists' desire to experience China as it was in the past sometimes seems to consign locals to a life of poverty, yet the government's attempts to attract ever more visitors could ultimately drive the tourists away.