Rotting carcasses of striped bass, bat rays and other fish have been washing up on the shores of the San Francisco Bay Area in recent days, after a toxic algae bloom spread across the area.

The toxic bloom began in July and has stretched as far north as San Pablo Bay, roughly 20 miles (32 km) north of San Francisco, to as far south as the coastlines of San Mateo County, said environmental advocacy organization San Francisco Baykeeper.

It identified the culprit behind the murky brown waters as a species of algae called Heterosigma akashiwo.

"This bloom's been going on for over a month and it's covering San Francisco Bay, so the scope and the duration of this bloom is unprecedented," Jon Rosenfield, a Baykeeper senior scientist, told Reuters.

He blamed the bloom on treated wastewater containing nitrogen and phosphorous dumped into the bay by about 40 wastewater treatment centers.

A spokesperson for the public works department in the city of Oakland, across the bay from San Francisco, said it is doing what it can to deal with the fish deaths and algal bloom, but could not speculate on the root cause of the phenomenon.

Workers on Wednesday donned hazmat suits with N95 masks, gloves and boots and climbed into the mud of Lake Merritt's shores, braving the pungent stench to collect rotting carcasses of fish and other wildlife floating in the water or resting on the mud.

"It's kind of my second home, and I've never seen anything like this," said Oakland resident Sara Moss, 27, who frequently comes to Lake Merritt. "It's insane how many dead fish there are, all sizes too."