Don’t go into that last building—the one with the centrifuges. That’s the place where they spin the water out of the sludge, making it light enough to carry away to fertilize farms and reclaim mines. Go inside, the workers say, and the stench will never leave your clothes.

But that’s a long way from where the story starts. To flush the toilet in your house is to begin a journey that you can trace on the map. The line flows south, like water draining downward, to the bottom tip of the District diamond: the Blue Plains Wastewater Treatment Plant, which for 73 years has handled Washington’s waste. It’s the biggest facility of its kind on Earth, or so D.C. Water claims.

Gravity, in fact, does do a lot of the work. But the combined effluent from homes and businesses, along with the stormwater from those parts of town where older pipes still throw the two types of runoff together, takes some pushing along: 25 pumping stations propel the chunky liquid through 1800 miles of underground pipes. While you go about your life, it’s all hurtling southward, picking up all manner of debris along the way.

It’s Blue Plains’ job to refresh and make new the nasty end products of civilization. The professionals there call it “purification.”

The plant, spread out over 153 acres, is the product of two centuries of work. Washington’s first sewers were constructed in 1810, and followed the growth of the District and the government it hosts. For about a century, sewage discharged directly into the Anacostia and Potomac rivers. Then the federal government set up filters at the main discharge point, around where the rivers leave the city. As the population grew, so did the layers of purification. Over the years, it’s become a vast, multi-layered system of tanks and filters, operated mostly from a central control room full of screens, switches, and blinking lights.

Nowadays, the great cleansing happens in six stages, which can be separated into three different types: physical, biological, and chemical. (It’s almost like the products of your digestive system are going through another digestive system, with an esophagus, stomach, and intestine.)

The first two stages are essentially a sieve. Quarter-inch screens catch cigarette butts and cocktail straws that would gum up the works further along. The process produces a smooth liquid that feeds into massive circular vats. Those vats slow down the water and settle out grit. Each one has a scraper that rotates so slowly that the movement is almost imperceptible, cleaning sludge off the bottom without sending it back up through the liquid.

The next stage requires a little help. Here, organic compounds are broken down and digested by thousands of different varieties of bacteria, affectionately known to the plant’s engineers as “bugs.” It’s their job to turn toxic ammonia into nitrates, which are found throughout the aquatic environment. In rectangular tanks along Aeration Road (Blues Plains’ streets are roughly named for the treatment function located on them), oxygen is sent up in streams of bubbles from washing machine-like blowers at the bottom of the tanks. They’re driven by six pumps with 13,000 horsepower between them, creating a churning brown brew.

A more specialized breed of bugs is needed for the next phase, “de-nitrification.” Here, oxygen is removed from the system. The bugs are fed with carbon in the form of methanol, which allows them to turn nitrates into harmless nitrogen gas that escapes into the atmosphere. These tanks are more tranquil, like a good miso soup. The bacteria settles down to the bottom and is fed back through pipes in cavernous subterranean “galleries” to do their job again. (If they’re not settling nicely, the engineers will turn down the oxygen further, killing off the smaller bugs that have trouble sinking.)

From there, the water moves on to its final stage of purification, chemical. Chlorine is added, then slowly filtered through fine sand and anthracite, which removes any last traces of contamination. But for streams of water cascading from fountain-like arched pipes, these tanks are quiet and smooth as glass, as if the water has entered a dreamlike state.

After one more chemical process, the chlorine is removed, and the water moves through two 12-foot-wide pipes into the Potomac. In all, ten to fourteen hours have passed since the stuff first entered the plant. Watching from a pier by the outfall, there’s no discernible disturbance on the surface, aside from the occasional blue heron or the splash of a bass fish. Staffers say the wildlife congregate around the highly oxygenated water that leaves Blue Plains, cleaner than the river it enters.

Of course, purification comes with consequences—or, at least, byproducts. What happens to all the gook the plant has taken out of the 350-some million gallons of sewage that flows through it every day? The stuff from the earlier stages is garbage, and has to be dumped in landfills. But the later sludge is reusable. To make it light enough to be trucked away, it gets processed in that giant boxy building with the centrifuges. Like the guides say, don’t go in.

At the moment, Blue Plains is undergoing a massive modernization. Tractors and backhoes are hard at work clearing the ground for eight new egg-shaped anaerobic digesters that will make the waste sludge into valuable fertilizer. And massive holes are being dug along the Anacostia to make room for pipes that will further separate stormwater from raw sewage, preventing it from overflowing into the river during major rainfall. At $2.6 billion, it’s the biggest project you’ll never see. -Lydia DePillis