At a glance, the sparkling waters of the Southern California coast appear healthy. But a deeper dive into the water’s chemical composition reveals high levels of algae and low levels of oxygen.

The estimated 23 million people who live along the coast from Tijuana, Mexico, to Santa Barbara, California, produce tons of sewage each day. That sewage is treated by water treatment facilities to remove some of the potentially harmful chemicals and then discharged deep below the surface of the ocean.

But even after it’s treated, the sewage still contains nitrogen. And experts had supposed that, because the sewage is injected so deep below the surface — about 50 meters, or 164 feet — by the time it reached the water’s surface, the remaining nitrogen would be diluted enough not to cause any serious negative consequences.

But in a new study, UCLA researchers found that nitrogen in treated sewage is driving a massive growth of oceanic algae and loss of oxygen, which will likely have lasting effects on the region’s ecosystem. From 1997 to 2000, for example, the growth of microscopic marine algae called phytoplankton was 79% higher than it would have been without nitrogen from human sewage in the waters along the coast from the Baja California Peninsula to Santa Barbara.

The problem occurs in large part because freshwater from sewage is less dense than the seawater it’s injected into, which causes the wastewater to rises to the surface, where phytoplankton live. The phenomenon is enhanced by powerful upwelling along the coast — a process in which cold, nutrient-rich water rises to the surface to replace water pushed away by wind. Phytoplankton use nitrogen to grow, and the excess nitrogen from wastewater causes phytoplankton to grow at a much higher than natural rate — a process called eutrophication.

When phytoplankton decompose, they consume oxygen from the water, leaving patches of the ocean with low oxygen where it’s difficult for marine animals to survive. The phenomenon has mostly been observed because of runoff from agricultural settings, but the UCLA study is one of the first to demonstrate that the problem could occur because of the waste produced by people living in cities.

“The thought that a major city on a coast exposed to strong currents could experience eutrophication is very new,” said James McWilliams, the study’s lead author, UCLA’s Louis B. Slichter Professor of Geophysics and Planetary Physics and a member of the UCLA Institute of the Environment and Sustainability.

Multiple agencies collect chemical samples of Southern California’s coastal waters on a seasonal basis, making it among the best-monitored coastal ecosystems in the world. So researchers knew the chemistry of the ocean was changing — and the change was being caused by some combination of human wastewater, carbon dioxide emissions, and the upwelling that occurs each spring and summer, fueling the phytoplankton blooms.

But scientists had been unable to tell what proportions of the changes were caused by each of those factors.

In the new study, McWilliams and his team untangle the impact of each of the various effects, finding that 97% of nitrogen added to the ocean from human sources is from wastewater. The researchers created a computer model to reconstruct the amounts of local nutrients from rivers, wastewater and rainfall going into the ocean, and account for how complex oceanic and atmospheric processes influence how those nutrients affect the water’s chemistry.

To confirm the model’s accuracy, the researchers checked their results against field observations and satellite measurements from the same time period.

The researchers ran the model under two scenarios — one that assumed natural conditions with no added nitrogen and one that included nitrogen from sewage, rivers and the atmosphere. When the two simulations were compared, the researchers found there would be half the amount of phytoplankton if human pollution were removed.

Fayçal Kessouri, a UCLA postdoctoral researcher, led the study; other authors are from the University of Washington, the National Oceanic and Atmospheric Administration, and the Southern California Coastal Water Research Project.

The study could inspire recommendations to improve nitrogen treatment in human waste management. However, according to Daniele Bianchi, a UCLA assistant professor of atmospheric and oceanic sciences and co-author of the study, one obstacle to improving current practices is that current wastewater treatments to remove nitrogen from sewage are very costly. He said improving wastewater reuse systems or using kelp to remove chemicals could be less expensive options.

More research is currently underway to understand how the eutrophication is affecting Southern California’s marine life.