Water watchers know: Sometimes, you can’t swim in the Willamette River.

That’s because when the wastewater system gets inundated with water, it overflows, sending raw sewage into the river that bisects Portland.

Nowadays, these overflow events happen roughly four times a year. But they used to happen much, much more frequently, sometimes 50 times a year.

So what changed? The “Big Pipe.”

In 2011, the city completed its biggest-ever public works project. It was a complete overhaul of the wastewater system – the $1.4 billion Big Pipe.

Portland’s wastewater is made up of combined sewers, which capture stormwater and sewage and send them together to the water treatment plant.

During dry weather, there wasn’t a problem: The sewage would travel from homes and businesses to the plant.

But, when the weather got wet, storm drains would send huge amounts of water into the system, which would overflow and send billions of gallons of sewage and stormwater into the Willamette River and the Columbia Slough, creating a perfect environment for E. coli and other pathogens, including Salmonella, Giardia, and viruses like norovirus, which can sicken people, pets, and wildlife through direct contact with contaminated water.

The project to address this issue began in 1991. The first step? Reduce stormwater cascading into the system.

Around Portland, you can see those solutions in action. Downspouts no longer drain directly into the sewer, and rain gardens have replaced some street drainage systems. By the end of the program, more than 56,000 downspout disconnections were keeping about 1.2 billion gallons of stormwater a year out of the combined sewer system.

After about a third of the stormwater was removed by those projects, construction began on the Big Pipe, which would address the remaining water and sewage.

Portland’s Big Pipe project consists of three major tunnel segments: the Columbia Slough Big Pipe, completed in 2000 and about 12 feet in diameter; the West Side Big Pipe, completed in 2006 and about 14 feet in diameter; and the East Side Big Pipe, completed in 2011 and about 22 feet in diameter.

Under Portland’s Big Pipe system, wet-weather flows are routed to the Columbia Boulevard Wastewater Treatment Plant, which the city says treats about 28 billion gallons of sewage and stormwater in an average year before releasing the water into the Columbia River.

Before the project, Portland averaged about 50 combined sewer overflows a year, spilling roughly 6 billion gallons annually into the Willamette River and Columbia Slough. Since completion in 2011, overflows have dropped to fewer than four a year on average, with total overflow volume reduced to about 297 million gallons annually – a decline of about 95% by volume, according to the Bureau of Environmental Services.

You can track the capacity of the Big Pipe here.