They say that shit runs downhill. This is commonly understood to mean that the world is an unfair place, except among those few people who actually work with the substance, for whom it is considered something of an article of faith. This is because municipal sewerage systems are powered almost entirely by gravity, which means that when working properly, they move millions of gallons of sewage a day across considerable distances with only a minimum expenditure of energy, a feat of efficiency virtually unparalleled in the annals of engineering. When sewage stops running downhill, as it inevitably does from time to time, very bad things indeed can happen, as they did on Pecan Springs Road, in the Austin neighborhood known as Windsor Park, one morning last September.

I was spending the day with an Austin Water Utility emergency-response crew when dispatch got a call from a woman reporting that two rooms of her house were flooded with sewage. Our crew consisted of a TV truck, piloted by a twenty-year line-maintenance veteran named David Eller, and a flusher truck, driven by another longtime utility employee, named Dale Crocker. At the house, Eller, who wears wraparound sunglasses and looks a little like the country singer Dwight Yoakam, unspooled a thick red cable from the back of his truck. On the end of the cable was a camera about the size of a roll of quarters, which Crocker shoved down into a PVC clean-out pipe near the curb in the front yard. The woman leaned on a walker in her driveway, looking worried.

The pipe came into view on a screen mounted near the truck’s rear doors. The walls of the pipe were colored a pleasing aquamarine, and the inside looked remarkably clean as the camera moved slowly forward, scudding along through the trickle of water on the bottom of the pipe. After only a few feet, however, something white and fibrous appeared at the top of the screen. “Tree roots at three feet,” Eller announced.

Trees are the bane of all underground infrastructure, but they are particularly hard on wastewater systems. Tree roots end in tiny tendrils, which act as notoriously efficient water diviners, constantly probing and searching for moisture under the earth. If a pipe has even a pinhole leak, which often occurs at joints, the tree will find it and begin slowly working its way into the opening. Root tendrils no more rigid than a stalk of celery can penetrate concrete or iron, in a sort of slow-motion version of a tornado slamming a two-by-four through a car door. There is no way to stop this, though many ideas have come and gone, including pipelines that exude their own herbicide. Once inside a pipe, roots flourish in the moisture-rich environment, eventually forming dense root-balls through which solids cannot pass.

In this case, the culprit was almost certainly a fifty-foot cottonwood in the middle of the front yard. A few feet past the root-ball, Eller detected a wastewater-filled sag in the line, probably caused by roots from the same tree pressing down on the top of the pipe. The root-ball was the most likely cause of the clog, but a sagging pipe can spell trouble down the road for a property owner—or PO, as the line crews call them—if it gets worse and causes the line to break. Still, Eller assured me that the woman had gotten off easy. Clogs in sewer mains—the larger lines that run under the street collecting sewage from the smaller service laterals that connect to homes—can be much worse. If you happen to live just upstream of the spot where the main in your street is clogged, what backs up in your toilet is not just your own sewage but your neighbors’ too. Like all flooding victims, the lower you are in the topography of your neighborhood, the worse you get it. Eller recalled one emergency he went out on last year in East Austin. “This guy indicated to me that shit water was shooting out of his toilet with five hundred roaches coming out of it,” he said, outlining with his arms an imaginary column of brown water and roaches.

“Worst I ever saw was off of Salton Drive,” Eller continued. In that incident, a main had been completely eaten out by hydrogen sulfide, an acidic gas that collects in pipes that are not flowing well. Over time, hydrogen sulfide can turn concrete into a porridge-like mush. Another component of sewer gas, methane, can be poisonous to breathe at high-enough concentrations. Last July, a farmer in Virginia walked down into a holding pit of liquefied cow manure and hit an invisible pocket of methane so concentrated that he instantly dropped dead. When his wife and two daughters went down to retrieve him, they dropped dead too. On Salton Drive, the gas had been so potent that the main was simply gone. “Must have flooded sixteen homes,” Eller recalled. “I mean, it was a foot up on the sides of their houses. The street was just full of water, women’s products floatin’ everywhere. The POs were freakin’ out.”

A flusher truck carries an array of obstruction-busting nozzles, each designed for a different type of blockage and a different size of pipe. The larger ones are two feet long and weigh upward of thirty pounds. Crocker showed me his collection of smaller, service-lateral-size nozzles, stainless-steel implements of destruction that he kept in a padded case reminiscent of something Q would hand 007 in the first act of a Bond movie. For this job Crocker chose a Warthog, a shiny four-inch-long device shaped like a fifties pencil sharpener. The Warthog screws onto the end of a hose and spins around like crazy when you send water through it, cutting up roots and whatever else might get in its way. If it were not inside the pipe when you turned on the water, the Warthog would whip around like one of those front-yard water toys kids used to play with, except that if it hit you, it would kill you.

Crocker snaked the Warthog down into the clean-out on the end of a long black hose and began blasting the pipe with water from the flusher’s giant tank. After a few minutes, he reinserted the camera to see what he had accomplished. The PO hobbled over to the rear of the truck to look at the monitor. Awakened by the rumbling of the flusher truck, a neighbor who worked nights came out in his shorts and bare feet to see what was going on. He was about thirty years old and had a long ponytail and several days’ worth of stubble on his jaw. Presently, our small audience was joined by a woman in a nicely tailored skirt and an older man, who had been walking the block. We all stood around the back of the truck, watching transfixed as the camera snaked along through the aquamarine PVC pipe, which was now mostly dry and clear of roots. “This is like a colonoscopy,” the older man said. When the camera came once again to the sag, still partially filled with water, there was a perversely satisfied “Hmm” from the audience, as though we had just watched Bob Vila find a termite pile on This Old House.

“Plumbing is some freaky shit,” the ponytailed neighbor said, and everyone nodded.

Sewerage is the sine qua non of urban life. London, the first megacity, might not have survived the nineteenth century had a medical researcher named John Snow not correctly theorized that recurring cholera epidemics were caused not, as was commonly believed, by the inescapable smell of raw sewage that plagued every corner of the city but by the bacteria leaking from countless overflowing cesspools into wells and streams used for drinking water. London eventually replaced its army of shovel-toting cesspool muckers with a citywide sewer system, which drastically reduced the incidence of disease and became known throughout the Western world as one of the marvels of the Industrial Age, though it was in reality not much more advanced than the system devised by the Romans more than two thousand years earlier. Today, at least three million deaths worldwide are caused each year by waterborne germs—mostly attributable to poor sewage disposal—and access to clean water remains a bellwether of development. In the neighborhoods of Baghdad, the presence of raw sewage in the streets four years after the American invasion, at least as much as rolling blackouts and roadside bombs, has come to symbolize the power of the insurgency and the ineffectiveness of reconstruction efforts.

If sewerage is the cornerstone of civilization, then ours is a civilization in decline. Decades of neglect and postponed maintenance have left an estimated $500 billion in needed repairs and upgrades to wastewater pipelines and treatment plants nationwide. Overflows, and illnesses related to overflows, are becoming increasingly common, yet there remains a general reluctance by municipal governments to raise taxes to invest in something that most residents take for granted. Decaying roads and bridges are symptoms of the same problem, though potholes are more visible to taxpayers than leaking pipes, and total failures—like the bridge disaster in Minneapolis—are much more spectacular. The problem is exacerbated in boomtowns like Austin, which has been one of the fastest-growing cities in the country since the late eighties. In 1999 the Environmental Protection Agency ordered the City of Austin to take drastic measures after a series of overflows, the worst of which was a massive spill into a stream called Brushy Creek that sickened 1,400 residents in suburban northwest Austin. The city is now in the fourth year of an eight-year, $350 million overhaul of its pipelines and by all accounts has already substantially reduced the number of overflows. When Eller first started working on an emergency crew two years ago, he was getting up to fifteen calls a day. Now the crews generally get fewer than half that number.

Partly, this is due to technological advances. At the headquarters of Austin Water Utility, an engineer technician spends eight hours a day watching recordings of the insides of sewer lines made by one of the city’s ten television inspection crews, assessing and prioritizing repair needs. Aside from the occasional camera-riding snake, lost armadillo, or rabid rat attack, the footage is unbelievably monotonous, but it is a key part of a program that has brought some order to a system that relied for years on the experience of a handful of employees who began their careers when Austin was a much smaller city.

Trying to get a handle on the vast network of underground infrastructure in a rapidly growing city like Austin is a bit like trying to master the basic code for an old piece of software like Microsoft Windows, which is so complex and has been patched and modified so many times by so many different programmers that nobody really knows exactly how it works. There are thousands of miles of lines in Austin, and new mains are constantly being added by developers building subdivisions, such that no one person or database can claim to know everything there is to know about the system. It is not uncommon for crews digging in older parts of the city, such as downtown, to come across old clay lines or brick manholes that are still in use but not on any map.

Even when maps are accurate, in such a complex system, mistakes will be made. Plumbers have been known to inadvertently tap into the storm sewer—a separate system of pipes designed to drain rainwater off roads—thereby hooking a household’s sinks, showers, and toilets right into the nearest creek. Several years ago, a plumbing contractor for a new subdivision in San Antonio connected to a system carrying partially treated water meant for irrigating medians and golf courses, thinking it was a city water main. Before the mistake was discovered, new residents had been bathing in and drinking non-potable water for weeks. Finally, a property owner complained to the city that the water didn’t taste right.

Sometimes the only indication that something has gone terribly wrong underground is when odd things—like big chunks of concrete—begin turning up at a wastewater treatment plant, the end of the line for sewers. A few years ago, a plastic liner failed in one of Austin’s largest wastewater interceptors, known as the Onion Creek Tunnel, which stretches for miles deep beneath the southern half of the city. Interceptors, which collect wastewater from thousands of mains, are like underground rivers; at peak flow hours, sewage howls through them at an alarming rate. In order to do a full inspection of a tunnel this large, crews will sometimes enter one end in a boat and float downstream to the other end. In the course of investigating the failed Onion Creek liner, inspectors discovered that a telecommunications company had unwittingly bored right through the upper portion of the seven-foot-diameter tunnel using remote-controlled digging equipment.

With the exception of a few big interceptor tunnels, however, most modern sewer lines are not large enough for people to get inside and have a look, which has historically made it extremely difficult to find out where exactly a leaking pipe has failed—and why. As one engineer put it in the March 2007 issue of the journal Underground Construction: “In 1969, we knew more about the dark side of the Moon than about the inside of small diameter sewer pipes.” The advent in the early eighties of TV inspection—including remote-controlled robotic cameras that could crawl hundreds of feet through mains—began to change that, and the business of line maintenance, formerly about sweat, hard-won experience, and a strong stomach, has now become a gadget-intensive job.

In recent years, for example, Austin Water Utility has placed dozens of electronic flow meters in pipes all across the city. The meters, sophisticated devices that measure how much wastewater is present in a pipe and how fast it is flowing, are all remotely monitored on a set of four flat screens that sit on the ample desk of an engineering associate named Robert Cameron. A typical 24-hour chart for a given flow meter looks like an EKG, with two big spikes—one around seven in the morning, when people wake up and have a morning shower and purge, and another in the evening, as supper dishes are washed and another round of bathing takes place. Cameron, who has a beer belly and keeps a can of Copenhagen always within reach, reads the charts like a doctor reads a pulse; anomalous data can point to a problem in the system. He showed me the chart for May 28, which had an unusual spike in the mid-morning. “Big storm,” he said. Heavy rains can infiltrate and overload cracked wastewater lines, causing overflows. Yet rain is also an invaluable diagnostic tool: Using the flow meters, Cameron can track infiltration during heavy rains and identify areas where repairs are needed.

A flow meter is a surprisingly reliable recorder of human behavior. An experienced wastewater engineer can look at the chart from a flow meter downstream of a football stadium and tell you when halftime occurred and whether the game was a blowout or a nail-biter that kept everyone in his or her seat until the final whistle. In a paper titled “Sewer Sociology,” engineers Kevin L. Enfinger and Patrick L. Stevens examined records from flow meters in Houston on the eve of Hurricane Rita during one of the largest—and most ineffective—evacuations in U.S. history. Nobody really knows how many people tried to leave Houston that day, but the sewers may have provided the best guess: In the neighborhood examined by Enfinger and Stevens, the flow was down 36 percent.

If there is one area of human behavior that continues to baffle wastewater engineers and operators, it is the seemingly endless variety of things people will flush down a toilet or, for the more determined utility customer, shove into a manhole. Bedsheets from a mental hospital. Rags soaked in every kind of substance you can imagine. Dead parakeets, dead hamsters, dead mice, dead pit bulls. Fish, alive or dead. Engagement rings (by accident—usually). Broken glass, cocaine, battery acid, rocks. Even shopping carts and wheelbarrows. These things are not gone forever. If they don’t get stuck in a pipe, most of them wash up on a metal bar screen in the headworks of a wastewater treatment plant, like the one at the Walnut Creek plant, in East Austin, where I stood one day last May and watched the screens being cleared by a pair of long robotic arms. Every few minutes, the arms crept up out of churning pools of murky water, hauling up loads of trash freshly scraped off the screens hidden in the rushing water below. I had to fight a powerful urge to step away from the open pools and back into the sunlight, yet at the same time, there was something weirdly fascinating about the machine’s methodical dredging, and I found myself lingering to see what would come out of the water next. It could have been anything. As it happened, the majority of the detritus consisted of two pretty mundane items: condoms and tampon applicators.

According to my guide, Raj Bhattarai, the manager of Austin Water Utility’s environmental and regulatory services division, an aversion to foul-smelling water is a product of human evolution: Over the millennia, our ancestors who learned to avoid bacteria-laden water were more likely to survive. This means that sewer workers have to learn to ignore their innate survival instincts, though most of the veterans I talked to insisted that the smell was not that bad—much more tolerable than, say, the odor of a landfill. Most people would not make such a subtle distinction, which is why the primary treatment portion of the Walnut Creek plant—that is, the smelliest part—was built entirely underground, a fairly new innovation when the plant was constructed in the late seventies.

Bhattarai, a short, balding man in his mid-fifties given to bad puns and fits of giggling, joined the utility seven years after the plant opened. He was born and raised in Nepal, where his father was a justice on the supreme court. Bhattarai was accepted to a prestigious engineering-and-science academy in India at a time when modernization was making heroes out of people who knew how to build things like highways, bridges, and dams. The most fascinating new field for Bhattarai, who grew up in a country without a single wastewater treatment plant, was sewerage. While most of the guys on the trucks I met wanted to know why I was even interested in the subject to begin with, Bhattarai launched right into a pen-and-ink diagram of how a treatment plant works and then proceeded to talk about wastewater for the next seven hours, along with many digressions into his ideas about recycling, pollution, public transportation, and bottled water, which he considers the greatest fraud ever perpetrated on the American people.

Much of my tour of the plant was spent in dimly lit, dank-smelling underground chambers filled with tiny gnats and the sound of roaring water, where I struggled to hear Bhattarai explain the automated operation of machines with names like “scum beach” and “sludge pig.” Then he led me back outdoors, to the aeration basins, where the true genius of a modern wastewater treatment plant is found. The basins are huge concrete tanks where the partially treated sewage is roiled by thousands of air diffusers. Bacteria is the primary problem wastewater engineering was created to solve, but in the tanks it is actually encouraged to grow, as part of a sort of engineering jujitsu. In a natural setting, like a stream, bacteria from raw sewage will consume the dissolved oxygen in the water molecule by molecule until there is none left and the fish start to die. Once the dissolved oxygen is gone, the bacteria begin extracting oxygen from sulfates in the stream. The water turns black and starts emitting hydrogen sulfide, which is what gives a dead body of water its unmistakable rotten-egg smell.

If, on the other hand, the bacteria have a steady flow of oxygen, as they get in the aeration basins, something else happens. By way of explanation, Bhattarai hooked a tall plastic beaker onto the end of a long pole and dipped it into the frothing liquor in the basin. After a few minutes, the mixture in the beaker had separated into a top layer of clear liquid and a bottom layer of what looked like a loose pile of watery brown snowflakes. These were bundles of microscopic bacteria, known as flocs, gathered together in such huge numbers that they could actually be seen with the naked eye. “They are providing the treatment,” Bhattarai said. “And also the product of the treatment.” The flocs form around soluble and colloidal (greaselike) particles in the sewage, which have little weight and don’t tend to separate from the water on their own. Over time the flocs drag these particles to the bottom of the basins and form a layer of sludge, which is sucked out and piped away.

This is known as “activated sludge.” To make sure the microorganism population in the tanks remains vigorous, a portion of it is returned to the tanks, to act as a kind of yeast or roux for the next mixture. Once the process is up and running, it is relatively maintenance-free. “Salesmen will call from time to time pitching a new kind of bug, one that will do this or that for your plant,” Bhattarai scoffed. “The bugs we have are easy to keep happy.” Rarely, a bad batch of bacteria—for instance, one that forms flocs that tend to float instead of sink—will inhabit the aeration basins. When this happens, the offending tank is drained, and activated sludge from another tank is dumped in, to begin a fresh batch.

Bhattarai spends most of his time thinking up ways to make the plant run more efficiently. At the end of our tour, he took me to visit his pride and joy, a sludge thickener that he had helped redesign, resulting in a much more effective device and an award-winning paper in an engineering journal. Bhattarai had also redesigned the signage, since the original plaque, which was still there, had misspelled the word “thickener.”

“I wasn’t strong enough to pull the old one out, so I just had a new one made,” he said, pointing to a sign a bit higher up the hill. “If I die and they name something after me, I want it to be this.”

“A sewer is a cynic,” wrote Victor Hugo in Les Misérables, much of which takes place in the sewers of Paris. “It tells all.” Designed to collect both wastewater and rainwater from street-level storm drains, the original sewers of Europe, like those in older cities in the American north and Midwest, tended to have enormous tunnels, big enough to serve not only as metaphor-rich settings for novelists but also as unofficial repositories for anything anybody felt like getting rid of. In addition to the sewer men who mucked about in the tunnels under London and Paris, there was an entire caste of unfortunates—including an army of neglected children—who made their livelihood off things they found in the sewers: bits of copper, lumps of coal, even bone fragments, anything that could conceivably be resold.

Today there is a strange kind of anthropology available to students of sewage. One thing our sewers are telling us, for example, is that we are a self-medicating society. Last August, researchers at Oregon State University announced that they had studied the raw sewage of ten U.S. cities and ranked them according to the recreational drug of choice in each town: cocaine, methamphetamine, ecstasy, and so forth. The researchers would not give the names of the towns, citing promises they’d made to plant managers who granted them access, but the Drug Enforcement Administration is reportedly interested in the technology, which essentially amounts to urine testing an entire city with one sample. In a country where federal highway funds are dispensed or withheld according to the purity of air samples, it’s not too difficult to imagine a scenario in which cities that flunk their urine tests—say one part per million of crystal meth—might be similarly punished.

Many of the compounds found in recreational drugs and medicines actually survive the final chlorination and filtering process in a wastewater treatment plant and make it into nearby rivers and streams, where they flow into the water systems of other cities downstream. In this way, a dose of acetaminophen consumed in a mountain town in the Sierra Nevada eventually turns up in the digestive tracts of people living hundreds of miles away in Southern California. In 2002 the U.S. Geological Survey published the first comprehensive survey of pharmaceutical compounds found in the nation’s rivers. Some of the most common they discovered were the insect repellent DEET; triclosan, an antiseptic; and caffeine. Caffeine is a particularly good anthropogenic marker. Wastewater treatment plants remove about 99 percent of it from the waste stream, so if it is found in higher concentrations in a sample of river or lake water, you know there is a sewage leak occurring at some point in the system. Some of the most popular barbiturates of the fifties and sixties are also among the longest-lived pharmaceutical compounds. In all likelihood, some of the downers Elvis swallowed are still out there, somewhere, floating around in the ocean.

Of more concern is a class of chemicals known as endocrine disrupters, which mimic the actions of hormones and have been associated with sexual abnormalities in fish found in urban watersheds. The best-known source of such chemicals in treated wastewater is birth control pills, but a host of other chemicals, including perfume and soap additives, have now been identified as potential endocrine disrupters as well. Researchers are studying whether the presence of such chemicals in our drinking water is contributing to higher rates of diseases such as cancer and diabetes.

What we put into our bodies also has a direct effect on how well our sewers run. For instance, there is a sense in the pipeline world that concrete wastewater pipe is not lasting as long as it used to, though nobody is sure exactly why. The general consensus is that there is nothing necessarily wrong with the pipe, but that something we are doing differently aboveground is causing the waste stream to become, as the engineers say, more “aggressive.” Garbage disposals are at least partly to blame. They increase the amount of grease in the system, which slows the rate of flow in the pipes, which in turn allows more time for corrosive sewer gas to form. Other engineers point to the increase in protein consumption after World War II, when Americans began eating a lot more meat. A few years ago, during the Atkins diet craze, millions of Americans switched to a heavy-protein diet, so much so that it affected the futures market for commodities like cattle feed. If increased protein consumption really does make wastewater more aggressive, then our eating habits during the Atkins era must have put quite a stress on the nation’s sewers as well, something like putting 50,000 miles a year on your car instead of the usual 10,000.

Roy Bedichek, the great Texas naturalist, preferred to relieve himself out of doors. He believed that the advent of sewerage had broken a link in the ecological cycle, depriving the soil of vital nutrients contained in human excrement. Legend has it that even after he became an administrator at the University of Texas, he would seek out quiet places on campus to relieve himself, carrying a small trowel with him, as though he were on a camping trip. Citywide sewage collection presents an ancillary problem, one that may not have been obvious in Bedichek’s day, when Texas was still largely a rural state: Once you collect all the waste in one place, where do you put it? It’s a problem that gets worse as an area gets more urban and real estate gets more precious. New York City, for example, exports hundreds of tons of sewer sludge a year; in the nineties a good deal of it was shipped to far West Texas (on a train that came to be known locally as the “poo-poo choo-choo”), where it was spread on fields near the town of Sierra Blanca.

In the late eighties, Austin became the first city in Texas to try a new solution to this problem, in part by restoring the link Bedichek worried about decades earlier. Sludge from Walnut Creek and a second treatment plant is piped to the Hornsby Bend Biosolids Management Facility, located along a wide curve in the Colorado River, where a portion of the sludge is mixed with yard trimmings and turned into a compost known as Dillo Dirt. (Treated liquid from the two plants, meanwhile, goes into the Colorado River.) The compost is sold by the truckload, mostly to retailers and landscaping firms, which use it as a topsoil supplement. The organic content of topsoil—that is, the portion that sustains growing things—has declined in Central Texas, as it has everywhere in the U.S., in response to the pressures of farming and ranching, as well as erosion caused by development. Increasingly, topsoil has become a nonrenewable resource. “People look at it as gravel, instead of as a living thing,” said Jody Slagle, a manager at the Hornsby Bend facility.

Hornsby Bend also has a series of lagoons where excess liquid from the sludge is naturally—and gradually—treated by plants and animals that live in the water. Located on the site of Travis County’s first white settlement, it is a quiet and peaceful place, one that has become unexpectedly appealing to wildlife and observers of wildlife. Researchers from the University of Texas study leaf-cutter ants and dragonflies along the banks of the river, and thanks in part to the efforts of Slagle and a geographer named Kevin Anderson, the facility has become one of the top bird-watching sites in the state. Meanwhile, Anderson, who is writing his dissertation on what he calls “marginal nature,” is compiling a photographic record of all the organisms found in the soil.

Currently, approximately one third of Austin’s sludge is turned into Dillo Dirt; the rest is applied to hay fields surrounding Hornsby Bend. But Slagle would like to see all of it go to compost. “It could be one of the biggest keys to our future—if we can seamlessly integrate our waste into these cycles,” he said. Many Austinites are still leery of using human waste to fertilize their own yards, however. It’s the old instinct kicking in. “The closer it gets to their house,” Bhattarai explained, “the more they say, ‘I don’t think so.’”