The mayor of the US city of San Diego resigned amid a wave of sexual harassment complaints, issuing a blanket apology but also decrying the "hysteria" surrounding the case.

Mayor Bob Filner, a Democrat elected mayor of the southern Californian city in November, endured weeks of calls for his resignation. Angry citizens even organized a recall effort to remove him from office.

"I apologize to all of you," said Filner, 70, as he announced his resignation after a closed-door meeting with City Council members.

Filner, however remained defiant.

"Not one allegation ... has ever been independently verified or proven in court. I have never sexually harassed anyone. But there's a hysteria that has been created, that many of you helped to feed. It's the hysteria of a lynch mob."

As part of the agreement to leave office, San Diego will pay for a joint legal defense against sexual harassment lawsuits filed by employees or contractors.

"I think I let you down," said Filner, whose last day on the job is August 30.

"To all the women that I offended, I had no intention to be offensive, to violate any physical or emotional space," he said. "I was trying to establish personal relationships, but the combination of awkwardness and hubris led to behavior that many found offensive."

Although 18 alleged victims have publicly complained about the mayor's inappropriate behavior, only one -- his former communications director, Irene McCormack -- has filed a lawsuit. She is represented by high-profile attorney Gloria Allred.

"Today is a day of reckoning for Mayor Filner and a day of vindication for his many alleged victims," Allred said.

Though Filner "still continues to live in his own reality and deny responsibility for the conduct which we allege in our lawsuit," Allred said, "the fact is that he has done what was absolutely needed. He has resigned and that is what is most important."

McCormack claims that Filner said he wanted to sleep with her, asked her to work in her underwear, and said that he would marry her.

In July Filner admitted that he had engaged in "wrong and inexcusable behavior" and enrolled in two weeks of behavioral therapy starting August 5.