PINGYAO, China: It was a time of new wealth, a gilded age in which entire families came into fortunes overnight.
To move the money, businessmen here in this city in northern China opened banks, the first in the nation's history. Soon branches sprang up across the country, and they began making loans. Money flowed this way and that.
Then, as quickly as it started, the entire system crumbled. The banks shut down and the city fell into ruin.
So went the history of China's first banking capital, which bloomed here in dusty Shanxi Province in the mid-19th century, during the Qing dynasty. With the global economy now reeling from the banking crisis that began in the United States, and as the explosive economic growth of China begins to slow, the rise and fall of Pingyao could be read by some as a cautionary tale.
But the present-day financial crisis has reinforced the sense of nostalgia surrounding Pingyao, which with its 33-feet-tall Ming dynasty walls is one of the best-preserved medieval towns in the country.
"The banks tell a history of Chinese financial development, like how China started to transform from feudalism to capitalism," said Ruan Yisan, a retired professor from the architecture department of Tongji University in Shanghai who has been instrumental in the restoration of Pingyao. "The staffs of the banks were trained to be objective and highly responsible to the accounting of the banks. Now, corruption is common and people don't place much value in moral qualities."
Today, the old center of Pingyao is a place of 40,000 people crammed into narrow alleyways and courtyard homes hidden behind decrepit wooden doors. The surrounding countryside is a dry patchwork of millet and corn fields covered with the fine yellow silt found across the Loess Plateau, one of the most erosion-prone places on earth.
At Pingyao's height, 22 banks here thrived on the flourishing trade in Shanxi Province, as silk and tea moved north to Mongolia and Russia from southern China, and wool went south.
Compared with the excesses of today, scholars say, the early days of banking were a time of solid business ethics. There were no toxic mortgages, no opaque financial instruments. Trust among businessmen was so strong that the banks were able to start a system of remittances, credit and check writing, the first of its kind in China. Currency was in silver ingots.
Yet, some of the banks' practices might raise eyebrows today.
Still visible in the two-story courtyards of the defunct banks here are opium dens and mah-jongg tables, as well as rooms where prostitutes hired by the banks plied their trade to win over potential customers.
When the banking system collapsed before the Communist Revolution in 1949, it was not because of greed or incompetence on the part of the bankers, Mr. Ruan and other scholars say. More important, they say, was the overthrow of the Qing dynasty in 1911 and the country's subsequent descent into warring chaos, as well as growing competition from well-financed foreign banks allowed to do business in China.
Pingyao's plunge into poverty left the town frozen in time.
The local government had no money to modernize. So the Ming-era walls remained standing even as ancient walls in other Chinese cities, including the ramparts around Beijing, were torn down by the Communists. Within the walls here, families continued living in old courtyards ? some within the once thriving banks. (Imagine the headquarters of Lehman Brothers converted into a commune.)
"The older people of the town were sad and upset," said Yao Minlin, 48, a native of Pingyao who led a couple of foreign visitors through the alleyways one recent afternoon. "They didn't want to see the banks close because then they would no longer have income. Everyone here depended on the banks ? merchants, guards, restaurateurs."
Prodded by preservationists like Mr. Ruan, local officials began restoring parts of Pingyao in the 1980s, giving the town a second life as a tourist attraction.
The first bank in China, called Rishengchang, or Sunrise Over Prosperity, is now a museum in the town center, as are four other banks.
So great is the mystique around the banks that Chinese leaders have made pilgrimages here from Beijing. Framed photographs in Rishengchang show visits by Hu Jintao, the current Chinese president; Jiang Zemin, his predecessor; and Zhu Rongji, the former prime minister. Their visits were more relaxed than that of Emperor Guangxu, who slept in one of Pingyao's banks while fleeing invading European and Japanese troops in 1900.
To the people of Pingyao, today's leaders can learn from the old ways of doing business.
"Until the end of the Qing dynasty, Pingyao's banks had confidence, trust and good manners," said Li Yuerong, an aide to the manager of the museum in Rishengchang, which receives about 2,000 visitors a day. "This has a lot of benefits for management and financial development."
Ms. Li pointed out that the first manager of Rishengchang, Lei Lütai, was 53 when he started working at the bank. These days, she said, powerful businesspeople lack the wisdom of age. "They want to become rich very fast," she said. "They can't go step by step. They're in a hurry."
It is a myth, of course, that business dealings of that era were free of deceit and theft.
The cold, dark rooms of the old banks show the paranoia that grew as piles of silver accumulated. The treasuries of the banks were vertical pits dug beneath raised platform beds. Sleeping mats covered the pits. Two or three bank employees would sit or sleep atop the mats around the clock, said Mr. Yao, who has a relative who once worked as a clerk at Rishengchang.
Fear gave birth to Chinese versions of Wells Fargo ? companies that protected the silver as it was transported from one city to another. The guards were trained in martial arts and armed with halberds, maces and battle axes. Today, on weekends a master still teaches kung fu to children on the grounds of one of the old martial arts schools.
The memories of former glory linger in other buildings. At a temple one afternoon, crowds of local residents clutching incense sticks bowed in front of an altar to the god of wealth. The families of Pingyao know all too well this old saying, "Wealth does not last for more than three generations."