THE old-timers down by Bubbly Creek were hoping to land catfish for dinner. On a sunny afternoon they were fishing on a southern fork of the Chicago River made famous by Upton Sinclair in his social-realist novel of 1906, “The Jungle”. Sinclair described how offal and waste from the meatpacking industry had created a river so vile that putrid gas bubbled up from the bottom and made the river literally combustible. Today, the river hardly ever bubbles but the pollution remains so serious that the federal Environmental Protection Agency (EPA) has ordered the state of Illinois to clean it up. Earlier this month, the EPA and the state finally agreed over how clean the river should be.

Until recently the Metropolitan Water Reclamation District of Greater Chicago (MWRD)—the agency responsible for dealing with the city's sewage and storm water—had always insisted that the river was little more than a series of canals for shipping and drainage of storm water and municipal effluent. The previous head of the MWRD fought long and hard against tough and expensive water-quality standards. Most memorably, he once argued that if the water were made cleaner, accidental drownings would increase.

In the end sense prevailed and Chicago will finally lose the unwelcome distinction of being the only big American city that fails to disinfect its sewage. The MWRD, one of the world's largest wastewater treatment agencies, with a budget of around $1 billion, has agreed to clean up. Disinfection technology could cost it $250m to build and run over 20 years.

For many this is a turning-point for a river that has been gradually clawing its way back to life. The timing is no accident. The river is increasingly seen as an environmental and economic resource. A decade of investment has set the scene for demands to improve water quality. Downtown, a new riverside walk brings tourists and allows office workers to stretch their legs. New waterfront restaurants, and developments such as Chicago's Trump Tower, have been popping up. David Spielfogel, head of policy for the mayor, says that the city already has a spectacular front yard for tourism and recreation in the form of Lake Michigan, and now wants the same thing along its river.

The city plans to get more people to use the river by building boathouses. But in the longer term water quality must improve enough for swimming. Debra Shore, a commissioner at the MWRD, says disinfection is one of a host of expected new water-quality measures.

The flow of the river, westward towards the Mississippi, is not natural. It was reversed in 1900 to prevent its filth entering Lake Michigan—the source of the city's drinking water. Some groups, such as the Friends of the Chicago River and the Natural Resources Defence Council, wonder whether the river's flow should be halted or even reversed again—thus preventing the spread of alien species between the Great Lakes and the Mississippi river system. But for a double-reversal, water quality would have to be much better.

The challenge for city and state authorities is to find money to invest in the river; but one study found that improving water quality alone would eventually give a $1 billion boost to the economy. Chicagoans increasingly see their river as a source of great opportunity. The river, and its connection between the Great Lakes and the Midwest, is the reason that Chicago flourished. It now looks as if the city will return the favour. The river may turn out to be one of the keys to Chicago's future, as well as to its past.