San Francisco Bay is becoming clearer.

Decades of tidal action have finally washed away most of the mess created 150 years ago by Gold Rush miners who blasted apart hillsides in the Sierra Nevada. The result was millions of tons of mud, gravel and sand that made its way downriver and ended up in the bay, clouding its waters and coating the bottom with a level of silt up to 3 feet thick.

Most of the silt, scientists say, has now moved out to the ocean.

But what sounds like good environmental news has a significant downside: The clearer water is letting in more sunlight — and that’s causing a big increase in the amount of algae blooming in the bay.

“The bay is a very different place now than it was 15 years ago,” said David Schoellhamer, a hydrologist with the U.S. Geological Survey.

Since 1993, the concentration of algae in the South Bay, which is shallower and receives less tidal action, has increased 105 percent — 300 percent during the summer — according to the USGS. In San Pablo Bay, it has jumped 72 percent.

All the algae hasn’t yet turned into vast mats of floating green slime, like in Lake Erie, or generated “dead zones” like in the Gulf of Mexico, where low oxygen levels have killed fish and other marine life.

But the issue is increasingly raising concerns.

Scientists, state water regulators and operators of the 42 sewage treatment plants around the bay have stepped up research and planning over the past two years. They say that if algae levels continue to increase, sweeping new regulations that could cost from $5 billion to $10 billion may be imposed on the sewage plants to reduce the amount of nitrogen and phosphorus they put into the bay, both of which act as fertilizers.

“It’s a high-priority issue. Our goal is to avoid serious water quality problems,” said Naomi Feger, planning division chief of the San Francisco Bay Regional Water Quality Control Board in Oakland.

Over the next year, the water board will work on setting limits for nitrogen and phosphorus and begin computer modeling to see if moderate changes in the way sewage plants operate would reduce algae growth, Feger said.

A decision about whether to put in place mandatory new rules — which could raise the monthly sewage bills for millions of Bay Area residents — is at least five years away, she said.

Few Californians realize how much the Gold Rush reshaped their state’s geography.

Starting in 1853, gold seekers began using a technique called “hydraulic mining” in the Sierra. Rather than just toting pick axes and shovels into the gold fields, mining crews would pump river water at high pressure through canvas hoses and giant water cannons with iron nozzles.

The jets scoured away entire hills. The practice, which was particularly intense near Nevada City at a site called the Malakoff Diggins, made some miners rich. But it created devastating erosion, sending torrents of mud and sand downstream.

Millions of tons of sediment clogged rivers and choked farmland. Finally, one furious farmer from Marysville sued to block the practice. In 1884, in California’s first landmark environmental court case, San Francisco Judge Lorenzo Sawyer declared hydraulic mining to be “a public and private nuisance” and shut down the practice.

But the silt kept the bay cloudy for more than a century afterward. As the Bay Area’s population grew, the nutrients from treated sewage pumped into the bay increased, but the silt kept the nutrients in check.

“If you applied a bunch of fertilizer to your garden but put a net over it that kept out the sun, that would prevent your plants from growing,” explained David Senn, a senior scientist at the San Francisco Estuary Institute. “If you removed that shade, your plants would grow more rapidly.”

Now the shade is being removed. The clarity of the bay increased 36 percent more on average from 1999 to 2007 than from 1991 to 1998.

“There is still some hydraulic mining sediment in the bay. It’s not like it’s all gone,” Schoellhamer said. “But the bay is establishing a new equilibrium.”

Phytoplankton, algae and other microscopic plant life in the bay are vital to its health. They provide food for fish, clams and other marine life. And they create oxygen.

How much is too much?

“Phytoplankton is like red wine,” said Jim Cloern, a senior scientist with the U.S. Geological Survey who has studied the bay for nearly 40 years. “A glass a day is good for our health, but a bottle a day is bad for our health. The question is where are we now between the glass and the bottle?”

In addition to the Gold Rush sediment, Cloern said, two other things have helped keep algae blooms in check in years past: strong tidal action, and an abundance of clams and mussels consuming large amounts of algae.

In recent years, not only has the silt decreased, but so have the clams and mussels in many parts of the bay, Cloern said. That’s because ocean conditions have led to more fish and crabs coming through the Golden Gate to eat them.

The sewage treatment plants haven’t been increasing the amounts of nitrogen and phosphorus they are putting in the bay. But the bay’s resistance to algae blooms has weakened.

“Climate change isn’t fair either and we’re going to have to deal with sea level rise,” said Mike Connor, general manager of the East Bay Dischargers Authority, a public agency that represents six sewage treatment plants from Fremont to Livermore.

Connor said that the solution may be to recycle more treated sewage to irrigate golf courses and use in industrial cooling.

Already, 3 million gallons a day goes to cool the Calpine power plant in Hayward. San Leandro irrigates two golf courses with recycled water. San Jose and the Santa Clara Valley Water District are building a $50 million recycled water plant in Alviso. New technology also is allowing sewage plants to convert phosphorus to fertilizer pellets that they can sell to farmers, he added.

Environmentalists say more scientific studies and the growing attention from regulators are key to finding a solution to the algae problem.

“If we do determine that something bad is happening and the wastewater treatment plants are the main cause, it’s not like we can flip a switch overnight and upgrade all of these plants,” said Ian Wrenn, a hydrologist with Baykeeper, a San Francisco nonprofit.

“It’s a very slow-moving process. But I think a lot of the treatment plants see the writing on the wall.”

Paul Rogers covers resources and environmental issues. Contact him at 408-920-5045. Follow him at Twitter.com/PaulRogersSJMN.