LOS ANGELES — Officials in Southern California are crying foul after more than 140 million gallons of raw sewage spilled into the Tijuana River in Mexico and flowed north of the border for more than two weeks, according to a report.

The spill was caused Feb. 2 during rehabilitation of a sewage collector pipe and wasn't contained until Thursday, the International Boundary and Water Commission said in its report released Friday. The river drains into the Pacific Ocean on the U.S. side.

Serge Dedina, the mayor of Imperial Beach, California, said residents of his city and other coastal communities just north of the border have complained about a growing stench.

Dedina criticized federal officials in the U.S. and Mexico for not alerting people to the spill.

"Border authorities charged with managing sewage infrastructure and reporting these spills must do better and be held accountable for this act," Dedina said in a statement Saturday. He called for the resignation of Edward Drusina, chief of the international water commission, over his lack of attention to cross-border sewage flows.

Officials with the commission didn't immediately return calls from The Associated Press seeking comment Saturday.

The mayor said his office will seek an investigation into the spill and its aftermath, adding that U.S. officials "must make fixing sewage infrastructure a priority and issue of national security."

San Diego County beaches, which typically would be closed by such a spill, already were off-limits to swimmers and surfers because of runoff as a result of recent storms, Dedina said.

Over the years, several large sewage spills on both sides of the border have worsened conditions in the Tijuana River, one of the most polluted waterways in the country, according to the San Diego Union-Tribune newspaper. Old sewage infrastructure in Tijuana, Mexico, and the lack of any plumbing in some residences there have been blamed for the problem.

Imperial Beach, popular among surfers, was closed for days in 2012 after a pipe broke in Tijuana and spewed nearly 3 million gallons of sewage into the ocean.