To understand just how serious Las Vegas has gotten about its water in the past 15 years, consider this scenario that Bronson Mack, who oversees water resources and operations in at Southern Nevada Water Authority, painted for me the other day.

Pack every hotel on the Strip—the Wynn, the Bellagio, Caesars Palace, all of them—full of guests. Now have them turn on every faucet and shower. For good measure, once they’ve got those running, have them flush their toilets over and over again. Gallons and gallons and gallons. Water waste at its wettest.

In most cities in the West, this image would put a water guy like Mack on edge. That’s because, in most places, all that water would flow through treatment plants and discharge downstream, removed from its water basin forever.

Not in Vegas. The city can’t afford to gamble on the weather. Rather, nearly every drop of water used indoors, not just on the Strip but across the valley, gets channeled through some 2,000 miles of pipe to treatment facilities, where the water is filtered, treated with bacteria that breaks down harmful compounds, and exposed to ultraviolet light that disinfects it. From there, it’s pumped back into Lake Mead, where Vegas can then draw it out again for use in those showers that are still running on the Strip.

“If Vegas had only indoor water use, we’d have a limitless supply of water,” Mack says. It’s a bit like the famous Bellagio fountain, a favorite punching bag for far-flung water activists: While the water cannons may seem like a massive waste of water, that same water is getting reused over and over.

As Steve Erickson bluntly told the Los Angeles Times last year, “These people need to remember that it’s a city built upon an inhospitable desert. What were they thinking?”

The Mojave Desert’s premier resort destination receives, on average, four inches of rain a year, a paucity of precipitation that might have even a sun-chapped Phoenix homeowner feeling parched and thankful for the eight inches of rain his city gets. This hyperdry climate means that when you take the number of people who live in Las Vegas and divide it by the gallons of water that get flushed, drained, and—perhaps most important—jetted out of automatic sprinklers every day, you arrive at a figure that’s higher than most any other in America: about 219 gallons per person per day. Places more naturally bestowed with water—like my home base of Seattle—use less than half of that per capita; people in San Francisco, by comparison, use about 46 gallons per person per day. What’s worse, 90 percent of that water comes from the Colorado River via Lake Mead, ground zero for the megadrought that’s been bearing down on the western United States.

This is why, when the topic of water conservation in Las Vegas comes up, many environmentalists see any solutions that don’t amount to strict water rationing or growth limits as completely missing the point: As long as you insist on putting a metropolitan area of 2.1 million people and rising (fast) in the middle of the desert, you’re going to be wasting water. As Steve Erickson, Utah coordinator for the advocacy group Great Basin Water Network, bluntly told the Los Angeles Times last year, “These people need to remember that it’s a city built upon an inhospitable desert. What were they thinking?”

So there is a viewpoint out there that Las Vegas should basically dry up and blow into the dust. We’re not going to go there. Rather, this story explores how Las Vegas hasn’t already dried up and blown into the wind.

The answer, Vegas people insist, is that the city has become a model of water conservation in the American West. It hasn’t undertaken any of its radical water-saving measures out of feel-good environmental altruism. That wouldn’t be Vegas’ style. Rather, like a house dealer looking at a bad hand against a water compact that allows it a pittance of Colorado River water, Sin City has been playing the conservative odds for more than a decade in hopes of keeping the casino alive to see another game.

“Vegas has done a pretty good job in the last ten-to-14 years now recognizing water is a scarce resource. They’ve done that despite incredible population growth,” says Michael Cohen, an expert on the Colorado River basin at the Pacific Institute, an independent think tank focused on water conservation. “They’re using less water now than they did 14 years ago. … They’ve been aggressive, and they seem to be, at least in the short term, on a reasonably good path.”

This shouldn’t come as a surprise. The city garnered headlines back in 2003 when it banned new sod in the front yards of new residential developments, nearly banned sod in backyards, and outlawed watering during the heat of the day. Other cities are now taking note. “Las Vegas presents a model of how quickly the landscape can change when a city moves aggressively,” according to a 2013 New York Times report. But it’s a host of other initiatives that may allow Las Vegas to become the city that taught America not only how to sin, but also how to do it without wasting water.

The Bad Hand

You can’t talk very long about water in Las Vegas without the phrase “2 percent” coming up.

That’s the percentage of water from the Colorado River’s lower basin allocated to southern Nevada by the 1922 Colorado River Compact, which doles out water rights to the seven states along the river’s path. By comparison, 27 percent goes to California and 18 percent goes to Arizona. But while Las Vegas’ allocation is small, its dependence on that allocation is huge: The Colorado River provides 90 percent of the city’s water via Lake Mead, created with the construction of the Hoover Dam in 1931. (The remaining 10 percent comes from groundwater wells across the valley.)

Those allocations made sense back in 1922, when southern Nevada looked like much of the rest of the Mojave—barren, inhospitable, and fairly uninhabited—and just 2,000 people lived in Las Vegas. (About 4,000 more lived in the surrounding county.) Those few settlers survived on a small collection of desert springs.

But shortly after the Colorado River Compact, the stars of Las Vegas’ fate began to align. In 1928, the federal government signed off on construction of what would become Hoover Dam, a mere 30 miles from downtown. The dam had two effects: First, its construction spurred a small population boom as workers flocked to the area; second, it greatly enhanced western states’ abilities to harvest water from the Colorado River. Suddenly the desert town found itself next to Lake Mead, the biggest reservoir in the country, and water was no longer a pressing issue. Even 2 percent of the Colorado was a huge amount of water, and the dam ensured that it would always be available, even in dry years.

In the 1930s, Nevada began to come into its own as the libertarian paradise it’s known as today. In 1931, the state legislature loosened its laws on marriage—or, more precisely, divorce—and lifted its ban on gambling. A few years later, Congress moved to lift Prohibition. The groundwork for Sin City was set. Then, in the 1940s, with World War II driving a boom in both the war industries and military enlistments, the keystone for Vegas’ growth fell into place: A raft of young men from Los Angeles with steady income grew eager to take advantage of all that loose law and good water just across the border in Nevada.

Vegas was on its way. Liberace debuted at the Persian Room in 1944; Sinatra at the Desert Inn in ’51; Elvis at the New Frontier Hotel in ’56. None of them had trouble finding water to clear their famous throats.

The city’s population continued to grow steadily over the second half of the 20th century. By 1990, 770,000 people lived in the Las Vegas metropolitan area. Developers planted houses in the dun-colored hills with little regard for water use.

As much as the Strip is a symbol of Las Vegas excess, with its rows of garish casino resorts, it has never presented the kind of water consumption challenge you might imagine. While the media is keen to use images of lavish swimming pools and the Bellagio’s iconic fountain to illustrate Vegas’ wasteful ways, casinos use a mere 7.6 percent of all the water in southern Nevada. The real water guzzlers have always been the city’s residents. Sixty percent of the state’s water goes to single and multifamily households.

That’s not because people in the city are prone to cottonmouth and drink more water than the average nondesert dweller. Landscaping accounts for about 70 percent of water consumption at homes there. Grass is hard to keep alive in the desert, but it’s a foundational element of the iconic American home. Some homeowner associations even had covenants requiring residents to maintain a lush lawn in their front yards, despite the enormous amount of watering it necessitated. That ended in 2003 when the practice was banned.

As ProPublica reported in June, the seven different water agencies that govern the area from Las Vegas to the tip of the state 100 miles south and share Nevada’s Colorado River allotment for decades “didn’t know how much water the area had—let alone how much water they were committing to give out.” Water agencies were essentially running up their credit cards in hopes that there was enough water in the collective bank—Lake Mead—to cover the bill.

That was the situation facing Pat Mulroy in 1989 when she took charge of the Las Vegas Valley Water District, which provides water to the city and sprawling unincorporated country around it. Mulroy had worked for the district for much of her career, but by her telling it wasn’t until she was at the helm that staff made clear to her how out of hand water use had become in the valley. In the midst of an economic uptick that year, when Steve Wynn opened the Mirage (Vegas’ first new casino in 16 years at that point), the rate at which per capita water use was rising more than doubled.

“When we started seeing 17 and 21 percent [increases], we were in trouble,” Mulroy told High Country News in 2001. Per capita use hovered at about 400 gallons. (That’s 75 percent higher than current levels.)

One of Mulroy’s first acts as water chief was to hire consultants to determine the city’s rate of water usage relative to its growth and the total amount of water available. The resultant report confirmed Mulroy’s fears that Vegas, were it to maintain its current rate of water usage, would be maxed out on water within a couple of years. She moved swiftly to halt new water allowances, which are necessary for new homes and casinos, in her district.

It was an unthinkable response; it stopped growth in Las Vegas. Mulroy says she was summoned to Steve Wynn’s office to explain herself. But the data was incontrovertible: At its rate of water consumption, southern Nevada was on pace to run out of water by 1995.

“Las Vegas is an easy target,” says Bronson Mack. “The reality is that Las Vegas is here, and I do not foresee Las Vegas drying up and blowing away. There’s no reason for the community to not continue to thrive.”

Mulroy explained that federal regulators in charge of the Colorado River had branded Vegas as a spendthrift when it came to water and were reluctant to help the city on its current course. The Interior Department, which oversees the water compact, could have allowed Vegas to draw higher flows from Lake Mead, but didn’t over concerns about encouraging irresponsible water practices. So Mulroy proposed creating a new water authority to oversee the seven different water districts and ensure a measure of consistency among them.

With Mulroy in charge, per capita water use began to ebb, thanks in part to public information campaigns. (Vegas residents in their 20s and 30s may remember receiving lessons from Deputy Drip, a water droplet mascot character outfitted with a gold badge and cowboy boots, which the city commissioned in the 1990s.) Mulroy also increased the total amount of water coming into Vegas by, controversially, buying up water rights in rural Nevada and paying other Colorado River users to conserve water, which allowed Vegas to draw those saved gallons out of Lake Mead for its residents.

But then came the “wrecking ball,” as Mulroy described to ProPublica: the drought. For three straight years, starting in 1999, precipitation in the Colorado watershed was well below average. In 2002, with the Colorado River watershed parched and Vegas’ metropolitan population now sitting at well over one million people, the water authority drew more water than it was allowed from Lake Mead. In other words, it had reached its limit. No more water. This didn’t mean faucets went dry, but it did mean that for all of Mulroy’s efforts the previous decade, Vegas had hit a wall.

“The drought changed everything,” Mulroy said.

That year should have marked the point where the gambler got his comeuppance, where the vacation story evolved into a cautionary tale of excess. Instead, it became the moment Las Vegas began drawing a blueprint for the rest of the American West on how to confront drought.

The Play

In an interview on NPR earlier this year, Charles Fishman, author of The Big Thirst: The Secret Life and Turbulent Future of Water, called Vegas “one of the most water-smart [cities] in the world,” concluding that water officials “have no choice.”

That’s because the city’s economy is based on attracting people to come to the middle of the desert, be it for a weekend getaway or to live out their golden years. There will always be economic pressure to push the limits with water, which means there will always be a tangible incentive to stretch the water as far as possible.

Water officials have leveraged technological innovations to help them track water and mitigate waste. For example, in 2004, the Las Vegas Valley Water District installed computerized monitors to detect leaks in its self-contained water system. (The district has installed more than 8,000 of these units to date.) This system has since detected more than 1,600 underground leaks, which has saved 290 million gallons of water—enough water to supply 1,800 Vegas homes for a year.

It has been even more aggressive with outdoor water use, which accounts for 70 percent of all water use in Vegas. Among its innovations:

Since 1999, the water district has been paying people to pull up sod from their yards. (The current rate is $1.50 per square foot; in 2014, the city paid out $3 million to homeowners.)

New houses cannot have sod in their front yards.

Backyards must be 50 percent or less grass.

During the summer, you can’t water your law between 11 a.m. and 7 p.m., the times of day when the sun is most liable to evaporate water before it soaks into the ground.

There’s an $80 fine if a water technician—known colloquially as a “water cop”—finds water trickling off your lawn and into a storm drain. (The Las Vegas Sun reported in 2013 that water cops had investigated 830 various water violations that year alone.)

The efforts are paying off. Though total water use for the city rose only slightly between 2000 and 2010—by about 1.5 percent—Vegas added more than a million people. That works out to a 33 percent per person drop in water use. Vegas water officials hope to go even lower, with a per capita water-use goal of 199 gallons per person per day by 2035. That’s 20 fewer gallons a day than is used today.

Other cities in the West have followed Vegas’ lead, but Mack, with the water authority, says Vegas has never been out to set an example. It’s just doing what it needs to do to stay “in water,” as the saying there goes. Though Las Vegas is rethinking the way it uses water, city officials aren’t rethinking growth in general. Water authorities now sound more confident than ever in Vegas’ ability to expand.

As John Entsminger, Mack’s boss and Mulroy’s replacement at Southern Nevada Water Authority, put it to the Las Vegas Review Journal in June, “You could add millions more people and the water footprint would be fairly minimal.”

As the desert metropolis expands and drought continues to parch the Colorado River basin, city officials are looking beyond Lake Mead. One proposal calls for a pipeline from eastern Nevada to pump groundwater now reserved for agriculture into the city. Though the pipeline is hung up by a lawsuit arguing that the pipe would deplete rural water tables used by other landowners, the question in the courts is not whether Vegas will be able to grab water from the eastern desert—it’s how much.

An editorial in the Las Vegas Sun, “Whatever It Takes to Get Water to Las Vegas,” nicely sums up the logic of the valley: “The state could cap growth in Clark County, but that would effectively cap the state’s economic growth as well.”

Mack acknowledges that his city invites controversy but shrugs it off with the air of someone who’s heard it all before. “Las Vegas is an easy target. You either love Las Vegas or you hate Las Vegas. The reality is that Las Vegas is here, and I do not foresee Las Vegas drying up and blowing away. There’s no reason for the community to not continue to thrive.

“We get beat up for importing water from the Colorado River,” Mack adds. “Well, we’re not the only ones who import our water. New York City imports its water as well.”