Used to be in San Francisco, Calif., every rainfall, shower or downpour, caused the combined sewers to overflow at the shoreline of San Francisco Bay, contaminating the beaches, preventing residents from swimming, surfing and board sailing and forcing the city to post health warnings at the shoreline for months at a time.

In 1972, Congress passed the Clean Water Act, which set in motion a nationwide effort to clean up the country's waterways.

Two years later, San Francisco adopted a master plan for wastewater management. In 1997, the city embarked on a program to build necessary facilities to upgrade wastewater treatment and protect San Francisco Bay and the Pacific Ocean. The major components of the program were completed in March 1997.

The construction projects have included new treatment plants located on both sides of the city; wet weather storage tunnels that ring the city and store and treat combined sewage during wet weather; and a deep outfall discharge that conveys treated Westside wastewater 4.5 miles beyond the shoreline.

As a result, San Francisco is one of the first cities in the country with combined sewers to achieve full compliance with Clean Water Act requirements. The city wastewater facilities now capture, store and treat all wet weather flows, sewage and stormwater, protecting the bay and the ocean.

Upgrading its system presented a unique challenge to San Francisco, because, during rainstorms, the city's many hills, combined with the high percentage of paved surfaces, quickly created a large volume of stormwater runoff. The highly urbanized city had very little space for the construction of facilities or the large storage and transport systems needed to hold stormwater. These physical factors complicated the construction of wastewater control facilities.

Additionally, the rocky terrain and the shoreline areas used for the system's storage/transports are below sea level, so engineers did whatever they could to make the building process easier. For example, they used open trench construction with pilings to hold back the sides of excavations.

And in sandy areas below the waterline, contractors introduced soft soil tunneling techniques never before used in the United States. Coffer dams were used along the shoreline to protect the bay's resources.

The storage/transports catch the combined stormwater and sewage as it overflows the sewer system but before it reaches the shoreline of the bay or ocean. The transports also hold stormwater and sewage for later treatment.

Total storage capacity is equivalent to two days of waste flow during dry weather. The transports also provide treatment consisting of settling and removal of floatable materials prior to shoreline discharge when wastewater flows exceed the system's total storage capacity.

By 1982, about 70 percent of the combined sewage was controlled. By 1986, an additional 20 percent was controlled with primary treatment. In 1993, secondary treatment was available for this component. Program completion provided control and treatment for the remaining 10 percent. Although this last component constituted the smallest volume, it also involved some of the most difficult construction, with costs that exceeded $300 million.

The Oceanside Water Pollution Control Plant, a major component of the master plan, was built two-thirds underground so that part of the San Francisco Zoo could be built above it. This sharing of land was necessary in the relatively small and dense city; otherwise, it would have been impossible to site the facility. Such concepts won awards for design, construction and operation.

For wastewater treatment systems, the ultimate environmental performance measure involves sampling marine organisms and conducting bioassay tests to determine if the treated effluent causes harm. This sampling and testing has consistently shown no adverse affects to the marine life of the bay or ocean.

The newly completed program means that sewage-carried trash is no longer on the beach or in the water. Additionally, the beaches can now be used after rainstorms because bacteria levels are not a threat to public health.

Community involvement was a major component of each project within the program. The Citizen's Advisory Committee on Wastewater provided overall program oversight for 25 years, and the city established special task forces, comprised of government agencies, community groups and individuals, for several component projects.

Issues addressed by the residents included facility location, appropriate treatment levels and localized construction impacts. Community involvement resulted in improvements to public resources.

Areas receiving improvement included a community center in one of the affected neighborhoods, a park, jogging paths, the oceanside highway (which was re-configured to hiking, biking and equestrian trails), and a seawall.

To meet the strict deadlines, including those for permits and enforcement orders, the city established a separate organization within the government: the Clean Water Enterprise.

This group, which made all the key decisions, consisted of managers, administrators, engineers and scientists who focused solely on the waterway construction program. The projects included two secondary treatment plants, three tunnels, four major pump stations and 11 major storage/transport facilities providing 190 million gallons worth of storage for combined sewage.

The facilities have been designed to high aesthetic standards to enhance the city's visual environment. Most are underground, but the above-ground pump stations and treatment plants are intended to improve the urban landscape.

San Francisco paid approximately half the construction cost for the new facilities, and EPA and the California State Water Resources Control Board provided the remainder. (The city's sewer service fees are in the mid-range nationwide and are the exclusive source of revenue to pay for debt service on bonds and repay loans as well as provide funds for regular operations and maintenance.)

Construction took 20 years and required an expenditure of more than $1.4 billion, or $1,900 for every person in the city.