A 50,000-gallon sewage about 20 miles north of Long Beach has forced the city to close the water at its beaches, Long Beach health officials said Tuesday.

The sewage was able to flow downstream after a blocked pipe overflowed into the Alhambra Wash. The wash leads to the Rio Hondo Channel, which flows into the Los Angeles River that ultimately empties into the ocean in Long Beach, the city’s Health Department said in a statement Tuesday evening.

“State law requires temporary closure and posting at beaches in these situations, out of an abundance of caution, until the water quality meets State requirements,” the statement said.

This is at least the third time this year that Long Beach has had to close swimming and water-recreation areas because of a sewage spill. In response to the chronic problem, the city is exploring whether it can sue upstream cities and agencies or otherwise hold them accountable for polluting local beaches.

Water quality teams are monitoring the coastline and will reopen the water when it meets state standards, the Health Department said.

Anyone can call 562-570-4199 or visit longbeach.gov/beachwaterquality to check for current water quality levels.