Several beaches in southern California were closed to swimmers and surfers Wednesday after nearly 8 million gallons of sewage was discharged into the ocean.

FOX 11 in Los Angeles reported that beaches in Long Beach and Cabrillo Beach in San Pedro would remain closed because of the millions of gallons of contaminated material that entered the ocean.

On Monday afternoon, the Los Angeles County Department of Public Health announced that sewage was discharged from an unspecified location at about 6 a.m.

As a result, untreated sewage was sent into the Dominguez Channel, which leads to an area near Cabrillo Beach. Eventually, the sewage flow was halted, the station reported.

LOS ANGELES FIRE DEPARTMENT USES HELICOPTER TO RESCUE MAN, DOG FROM LOS ANGELES RIVER

Long beach cleanup

Crews worked to clean up the beaches in Long Beach and Cabrillo Beach in California, after nearly 8 million gallons of sewage was sent into the Pacific Ocean, forcing officials to close the water for swimming and surfing. (FOX 11 Los Angeles)

Why the sewage was discharged was not immediately known, though officials said 8 million gallons of sewage entered into the channel because of the spill.

Health officials declared the water off Cabrillo Beach off-limits, noting that bacterial levels had risen and needed to come back down to acceptable levels.

In Long Beach, health officials closed water to all of its beaches as well, because of the spill.

37 MILLION CALIFORNIA RESIDENTS AT RISK FOR DANGEROUS FLOODING

Helicopter over the river

Torrential rains this week increased the flow of the Los Angeles River, which not only led to the Los Angeles Fire Department rescued a man from the river, who "jumped in the flowing water in pursuit of his dog," but also led to increased bacterial levels along the beaches. (LAFD/Daniel Castillo)

Officials said an additional spill occurred in Commerce on Monday, sending another 40,000 gallons of sewage flowing into the Los Angeles River, which ultimately leads to the Pacific Ocean.

CLICK HERE TO GET THE FOX NEWS APP

Residents were already warned to avoid ocean water because of bacterial runoff from recent torrential rains.