Local governments sued a U.S. agency Friday to demand a fix to a decades-old problem of sewage flowing downhill from Mexico and spilling onto U.S. wetlands and beaches.

The cities of Imperial Beach and Chula Vista and the Port of San Diego said the International Boundary and Water Commission's U.S. section has failed to meet obligations under the federal Clean Water Act to treat the runoff from Tijuana, allowing toxins and bacteria to spread in the Tijuana River Valley and out to the Pacific Ocean.

Polluted waters caused beaches in parts of Imperial Beach, a city of about 30,000 people, to close more than 200 days in 2015 and more than 160 days in 2016 and last year, according to the lawsuit in federal court in San Diego.

Cross-border sewage has long been a sore topic in San Diego but a spill last year led to mounting pressure on U.S. and Mexican officials to do more. Imperial Beach resident complain about the stench, especially during winter rains.

"You ask what brings a community to a tipping point. I don't know, but we're there," said San Diego Port Commissioner Dan Malcolm. "It's death by a thousand cuts."

The International Boundary and Water Commission's U.S. section, which works with Mexican counterparts to enforce bilateral agreements, referred a request for comment to the U.S. Justice Department, which did not immediately respond.

The long-expected lawsuit, filed in federal court in San Diego, also names Veolia Water North America, part of the French company Veolia Environnement, which operates a border water treatment in San Diego for the commission. The company had no immediate comment.

The lawsuit says the San Diego treatment plant has failed to catch hundreds of millions of gallons of wastewater since 2015.

The commission notified California officials this week that it is not legally required to treat sewage and collect trash that spills from Mexico and that it cannot commit any money to treatment unless the U.S. State Department secures money from Congress.