The Bay Area’s deeply unequal cities, home to mansions and shacks alike, are linked by one thing: thirst.

Banding together, the region’s water agencies on Tuesday unveiled the latest upgrades to a vast network that connects six million people and provides mutual aid in a crisis, such as an earthquake or severe drought.

“Interconnection makes all of us more reliable,” said Steve Ritchie, assistant general manager of the Hetch Hetchy Regional Water System, operated by the San Francisco Public Utilities Commission.

If an earthquake fractures one system, an adjacent system kicks in to keep the faucets running. In a pinch, water could flow from one end to the other of our nine county region — all the way from South San Jose to Oakland, for instance.

Meanwhile, upgrades completed by each agency is building a system that is far more resilient than before. Pipes are designed to bend or twist, not break. Water tanks are sturdy. So are treatment plants. Special hoses could deliver water over a fractured landscape.

Water systems such as Hetch Hetchy have been operating for more than 80 years and were in need of a makeover.

According to the U.S. Geological Survey, there is a greater than 60 percent chance of a major earthquake occurring in the Bay Area in the next 30 years. It may not rupture in the remote Santa Cruz Mountains, like the Loma Prieta earthquake of 1989, but underneath our feet.

A century ago, American individualism created a system in which each municipality had a great deal of autonomy, making regional cooperation challenging. There’s still a great deal of independence, with different water agencies getting their water from different sources.

But isolation is no longer good enough for the Bay Area’s $535 billion a year economic engine. The region is among the world’s highest concentrations of wealth and a center of innovation. with top universities and home to companies such as Apple, Google Tesla and Facebook.

“Water is the lifeblood of the Bay Area’s economy,” said Ritchie. “We happen to have all these different water systems that date back decades, even a century. It is one Bay Area now and we have to think regionally to make sure we are all able to serve all of our customers.”

At Tuesday’s behind-the-scenes tour, the agencies showed how they are combining forces to face the realities of delivering water in an earthquake and drought-prone area:

• In Castro Valley, East Bay MUD’s South Reservoir tank is replacing an open reservoir protected with a fragile wood roof. About two-thirds complete, the $15 million tank will hold 9 million gallons of water. It is a temple of seismic safety, with 18-inch thick concrete walls strengthened by bundles of rebar, to withstand sloshing. A band of steel surrounds the tank. like a belt. Completion is scheduled for December.

• In Hayward, an $18 million “intertie” of pipes, running through the city of Hayward, connects two East Bay water systems serving a combined 5.1 million people with the Hetch Hetchy system serving 2.6 million people.

• In Fremont, a large bright green above-ground pipeline, managed by the Alameda County Water District, crosses the Hayward Fault. It supplies water to 350,000 Fremont, Newark and Union City residents. There are $40,000 ball joints on both ends. The pipe, made of ductile iron, sits on special pads that allow it to slide. If the ground breaks, it can extend several feet.

• Also in Fremont, a massive new 60-inch pipeline constructed by the San Francisco Public Utilities Commission connects the seismically-safe new Irvington Tunnel to the new Bay Tunnel. The 3.5-mile Irvington Tunnel is built to withstand a 7.1 earthquake on the Calaveras Fault and a 7.25 earthquake on the Hayward Fault. Inside the tunnel are welded steel pipes, nine feet in diameter. The Bay Tunnel, 100 feet underground and running from from Redwood City to Newark, is also built to be extra sturdy.

• In Milpitas, cobalt blue pipes connect the Santa Clara Valley Water District with the Hetch Hetchy Water System. This “intertie” has been in use in recent weeks, because San Francisco stopped water flow from Yosemite due to construction, and relied on South Bay water, along with water from its local reservoirs.

Through these pipes, water would be sent from the Santa Clara Valley Water District through San Francisco’s Hetch Hetchy System, to Alameda County Water District — and delivered to East Bay Municipal Utility District.

Even the largest earthquake would never swallow whole an entire water system as colossal and dispersed as ours, the water experts said. But despite the interconnections, those first hours or days after a giant rupture could be traumatic, and there might be sputters and interrupted local flows.

To be truly safe, their advice: store bottled water.

There is only so much we can do with an earthquake that size,” said Bob Shaver, general manager of Alameda County Water District.