For more than 100 years, rain has washed the flotsam and jetsam of generations through the District’s sewers and into the Anacostia: tin cups and animal bones, then plastic wrappers and chip bags, swirled together with human waste, making the river one of the country’s dirtiest.

But a decades-long, $2.7 billion D.C. Water project is changing that.

Instead of muddying the Anacostia, choking out plants and wildlife and breeding bacteria, almost all of that muck will instead be diverted through an 18-mile network of four new tunnels and cleaned at Blue Plains, the utility’s sprawling wastewater treatment plant in Southwest Washington.

The Clean Rivers Project, mandated by a 2005 federal consent decree that required D.C. Water to clean up Rock Creek and the Potomac and Anacostia rivers, is one of the District’s largest infrastructure lifts since Metro.

The Anacostia segment is the effort’s largest and will not be finished until 2023, but one of its tunnels began operating in March and provides a glimpse into what a completed project may mean for the District’s troubled waterways.

In just four months, that tunnel, which runs parallel to the Anacostia for nearly 2 1/miles, has diverted more than a billion gallons of sewage and 100 tons of trash that would have otherwise washed into the river.

The sprawling Blue Plains treatment plant. (Reis Thebault/THE WASHINGTON POST)

Standing amid humming machinery on a walkway above a rapid of rushing wastewater after a recent rainstorm, Ryu Suzuki nodded to a shipping container full of plastic bottles, grocery bags, drink lids and cigar wrappers. They came from 85 million gallons of wastewater captured by the new tunnel.

“All this would’ve gone into the river,” said Suzuki, manager of process engineering at D.C. Water. “It’s scary how much used to go into the river.”

That is because in about a third of the city where the sewer system is outmoded, storm water and sewage runs through the same pipes. After heavy rains, that 19th-century system overflows — forcing anything tossed in the street that falls into storm drains and everything flushed down toilets to converge and flow into the creek and rivers.

Annually, it amounts to sewage by the billions of gallons, trash by the hundreds of tons.

In the 1990s, the organization American Rivers dubbed the Anacostia one of the “most endangered rivers” in the country. Six years ago, the Potomac received the same dubious distinction.

A ‘forgotten river’

This month, a crane lowered a hulking, drill-like machine 120 feet into the ground, to begin a five-year journey to complete the Anacostia portion of the Clean Rivers Project.

The machine, nicknamed Chris, will chew its way from RFK Stadium north toward Brookland. It will turn down Rhode Island Avenue and lumber beneath the Green Line, toward Bloomingdale.

When Chris finishes the job, it will have left behind 27,000 feet of concrete tunnel tall enough that a full-grown giraffe could walk through without bumping its head. When the Anacostia segment is completed, it will reduce sewer overflows into that river by 98 percent.

And as the Anacostia comes back to life, life is coming back to the Anacostia. A pair of bald eagles is nesting there. Osprey and beaver are returning. Humans, too — on stand-up paddle boards and sailboats.

“We have told people for years, ‘Don’t go there, it’s the forgotten river,’ ” said Jim Foster, president of the Anacostia Watershed Society. “Now, we’re trying to bring them back. I want the river to be a destination.”

The District is betting that cleaner rivers will be good for business, too. Healthy waterways are essential to new riverside developments, such as the Wharf along the Washington Channel and Yards Park on the Anacostia.

Foster, whose office is along the Anacostia, said the water will continue to get incrementally better, but he already notices the difference on his way to work. Thirty years ago, his predecessor was pulling tires and other car parts from the river, he said. Today, there’s much less trash.

“We’re on a great trajectory to a much cleaner river,” Foster said.

A $230,000 water bill

But above ground, there are concerns over user fees charged since 2009 by D.C. Water to help fund the project, particularly from those at churches and cemeteries who believe they are treated unfairly. Opposition to what critics call the “rain tax” boiled over during a D.C. Council budget hearing in May, when church leaders interrupted the meeting and sang a civil-rights-era anthem to protest mounting water bills.

“This is classic racism and classism,” said the Rev. Willie Wilson, pastor of the Union Temple Baptist Church in Southeast on a video recording of the hearing.

Wilson and other clergy take issue with how D.C. Water calculates the fee that funds the project. The utility charges all its ratepayers based on a property’s “impervious area,” or hard surfaces such as roofs or parking lots that cause storm-water runoff and contribute to sewer overflows. This method attempts to charge customers based on their contribution to the problem.

Yet the formula overlooks the contributions churches already make to the community, said Cecily Thorne, director of operations at St. Paul’s Episcopal Church, Rock Creek Parish.

“Churches are on the front lines in dealing with the city’s most vulnerable,” she said. “We’re a different type of organization.”