Techies from all over the world crowded Las Vegas this week for an annual gadget lovefest, the Consumer Electronics Show. But the region’s real engineering feat took place last month about 25 miles outside of town.

In early December, about 300 feet below the surface of Lake Mead, engineers drilled upward to complete the last major step in the construction of an enormous, three-mile tunnel. The tunnel now reaches the lake, which is the source of 90% of Las Vegas’ water. Once it’s operational and a new pumping station is complete, the pipeline will be able to draw from the lake even if water levels fall below the existing intake pipes (it’s getting close), keeping the faucets running in the drought-plagued region even after current ducts are left sucking air.

The tunnel has been under construction for seven years and is budgeted at $817 million. Still, the project addresses the symptoms but not the cause of the region’s water scarcity problem. Solving it will take greater innovation, and sacrifice—but not in the ways you might imagine.

At first glance, CES, with its 160,000 people descending on this fountain-filled desert city, is a case study in wastefulness. Approaching Sin City from the East, you fly over a relentlessly dry and beige terrain, with vast stretches of sand leading to similarly barren mountain ranges, and then suddenly you spot high-rise hotels, pools, and green boulevards that cater to the gambling crowd and conference set.

But Vegas’s tourism industry is remarkably water-efficient. That grass by the sidewalk on the strip? It’s fake. The hotel’s shower systems? Indoor plumbing in Vegas is almost 100% recycled. The dancing Bellagio fountain? It uses 40 acre-feet of water annually, enough for about six acres of alfalfa, and it uses groundwater from a well owned by the hotel.

The bulk of Colorado River water is used by farms in states like California and Arizona, which provide crucial jobs and food to much of the U.S., but also use 80% of the water. Other significant consumers are air conditioning units and residential lawns. Once that water is sunk into the dry desert ground, it doesn’t come back.

For years, water supply and real estate development have been awkward bedfellows. The region has overtaxed its reserves amid the rapid growth in residential and commercial building projects. The latest example: Elon Musk’s Gigafactory. Nevada recently dedicated $1.4 billion in incentives to the project, which will supply lithium-ion batteries, mostly for Tesla’s electric vehicles. It will use as much as 815 million gallons of water per year (from north of Lake Mead), according to some reports, twice as much water as the MGM Grand on the Las Vegas strip.

In bringing the factory to the state, “Water was a pretty significant part of the conversation,” Steve Hill, director of the Governor’s Office of Economic Development, told the Las Vegas Review-Journal. The factory will likely be supplied with its own water rights along with recycled water from the area, but it depends on a fragile system that requires vigilance in the short term and innovation in the long term. You can have the best tech in the world, but if you don’t also have the resources to power it—you’ll get about as far as the 3D TV.