This city of 20 million rose from the sea and grew into a modern showcase, with skyscrapers piercing the clouds, atop tidal flats fed by the mighty Yangtze River.
Now Shanghai's future depends on finding ways to prevent the same waters from reclaiming it.
Global warming and melting glaciers and polar ice sheets are raising sea levels worldwide, leaving tens of millions of people in coastal areas and on low-lying islands vulnerable to flooding and other weather-related catastrophes.
Shanghai, altitude roughly 3 meters (10 feet) above sea level, is among dozens of great world cities — including London, Miami, New York, New Orleans, Mumbai, Cairo, Amsterdam and Tokyo — threatened by sea levels that now are rising twice as fast as projected just a few years ago, expanding from warmth and meltwater. Estimates of the scale and timing vary, but Stefan Rahmstorf, a respected expert at Germany's Potsdam Institute, expects a 1-meter (3-foot) rise in this century and up to 5 meters (15 feet) over the next 300 years.
Chinese cities are among the largest and most threatened. Their huge populations — the Yangtze River Delta region alone has about 80 million people — and their rapid growth into giant industrial, financial and shipping centers could mean massive losses from rising sea levels, experts say.
Sea is advancing
The sea is steadily advancing on Shanghai, tainting its freshwater supplies as it turns coastal land and groundwater salty, slowing drainage of the area's heavily polluted flood basin and eating away at the precious delta soils that form the city's foundations.
Planners are slow in addressing the threat, in the apparent belief they have time. Instead, Shanghai has thrown its energies into constructing billions of dollars worth of new infrastructure: new ports, bridges, airports, industrial zones, right on the coast.
"By no means will Shanghai be under the sea 50 years from now. It won't be like the 'Day After Tomorrow' scenario," says Zheng Hongbo, a geologist who heads the School of Earth Science and Engineering at Nanjing University.
"Scientifically, though, this is a problem whether we like it or not," says Zheng, pointing to areas along Shanghai's coast thought to be shrinking due to erosion caused by rising water levels.
Chinese legend credits Emperor Yu the Great with taming floods in Neolithic times by dredging new river channels to absorb excess water. In modern times, the city has been sinking for decades, thanks to pumping of groundwater and the construction of thousands of high-rise buildings.
Reinforcing flood gates and levees
Today, Shanghai's engineers are reinforcing flood gates and levees to contain rivers rising due to heavy silting and subsidence.
"We used to play on the river banks and swim in the water when I was growing up. But the river is higher now," says Ma Shikang, an engineer overseeing Shanghai's main flood gate, pointing to homes below water level near the city's famed riverfront Bund.
Twice daily, the 100-meter (330-foot-wide) barrier, where the city's Suzhou Creek empties into the Huangpu River, is raised and lowered in tandem with the tides and weather, regulating the city's vast labyrinth of canals and creeks.
The 5.86-meter (19-foot) high flood gate is built to withstand a one-in-1,000 years tidal surge; the highest modern Shanghai has faced so far was 5.72 meters (nearly 19 feet), during a 1997 typhoon.
Levees along the Bund and other major waterways are 6.9 meters (nearly 23 feet) high, providing better protection than in Miami, New York and many other cities. But they still would be swamped if hit by a surge like Hurricane Katrina's 8.5-meter (28-foot) onslaught.
Shanghai is considering building still bigger barriers — like those in London, Venice and the Netherlands — to fend off potentially disastrous storm surges, most likely at the point 30 kilometers (18 miles) downstream where the deep, muddy Huangpu empties into the Yangtze.
‘It is extremely complicated’
Sang Baoliang, deputy director of the Shanghai Flood Control Headquarters, has been to see the Thames Barrier, which protects London, and the Deltaworks series of storm barriers and dams in the Netherlands, where two-thirds of the population lives on land below sea level, much of it reclaimed from the sea.
Like many Chinese officials, some of whom deem the topic too sensitive to discuss, Sang is cautious about what China might do.
"We are studying this, but it is extremely complicated," said Sang, as shots from surveillance cameras at dozens of flood gates flashed on a full-wall screen.
"If the research determines that indeed the sea level will rise further, then we will need to build the walls higher. But this is still under research," he said.
Such projects usually require several decades of planning and construction, and with sea levels rising, they likely will have to be adjusted, given the unknowns of climate change.
"Nobody — no municipal or provincial government, and no central government agency — is preparing adaptation plans for Shanghai or the Yangtze Delta," says Edward Leman, whose Ottawa-based consultancy Chreod Ltd. has published research on the issue. "They must begin now, as investments and decisions made today will have a major impact in the coming years."
Many live in low-lying coastal areas
Nearly a quarter of mankind lives in low-lying coastal areas, and urbanization is drawing still more people into them.
"The tendency of coastal and port locations to become playgrounds for architects and developers has become a global phenomenon in recent decades," says Gordon McGranahan, director of the human settlements group at the International Institute for Environment and Development, an independent think tank in London.
McGranahan helped author a 2007 report by the Organization of Economic Cooperation and Development that put the number of people living in areas vulnerable to such flooding at 40 million people, with trillions of dollars of homes and other assets at risk. By the 2070s, the number could rise to nearly 150 million, it says.
Extreme weather will aggravate the already precarious situation for many: in September, Tropical Storm Kestana left 80 percent of the Philippine capital, Manila, under water. Newspaper photos showed much of Haikou, on China's southern coast, flooded, as Vietnam evacuated more than 350,000 people from the storm's path.
In years to come, some Pacific islands, like tiny Tuvalu, are expecting complete inundation. Vietnam's environment ministry estimates that more than a third of the Mekong Delta, where nearly half the country's rice is grown, will be submerged if sea levels rise by 1 meter (39 inches).
Impoverished Bangladesh is spending billions of dollars on dikes and storm shelters, while seeking international aid to help it adapt to flooding that could force up to 35 million of its people to relocate by 2050.
Densely populated tidal flats
Though much of its land is arid, China likewise has millions of people living in densely populated tidal flats and coastal valleys who already must be evacuated during typhoons. Many of the country's biggest cities are threatened, the OECD report says.
"What has been specific to China has been the enormous coastward migration, unfortunately just at a time when it would have been better not to settle low-elevation coastal areas," McGranahan said.
Traces of former sea walls show that much of today's Shanghai, which sits between a flood basin and the sea, was under water or marshland until the 7th or 8th century AD. Over thousands of years, ancient settlements expanded and withdrew as water levels ebbed and rose.
In the future, communities unable to move may instead end up adapting buildings and infrastructure to accommodate higher water levels, says Hui-Li Lee, a landscape architect who is working on several projects in the region.
"There are many things we cannot account for, but if we know an area is going to flood, then we have to plan for that," Lee said. "When we look at a map, we have to think that 30 years later or 50 years later everything will be below sea level."