Blaming a lynch mob fueled by the media and political opponents, Mayor Bob Filner said goodbye to San Diego after its City Council accepted the terms for his resignation amid allegations of sexual harassment.

“It certainly was never my intention to be a mayor who went out like this,” Filner said Friday as he read from handwritten notes on a yellow legal pad.

Calling it the toughest decision of his life, Filner said he agreed to resign even though he knows he would be vindicated if given due process in a sexual harassment lawsuit filed by a former employee.

The city's first Democratic mayor voted into office in 20 years is also facing a criminal investigation by the California State Attorney General's Office, our media partner the Voice of San Diego reports.

At first, Filner blamed his own personal failures for his downfall. Then he turned defiant, describing the atmosphere around City Hall in the last six weeks as the hysteria of a lynch mob.

“Not one allegation, members of the council, has been independently verified or proven in court. I’ve never sexually harassed anyone," the mayor said of the numerous allegations from more than a dozen women. Filner has been accused of grabbing, groping, kissing and making crude comments to women when he was mayor and a U.S. Congressman.

He said he takes responsibility for putting the city through "a very bad time" and then moments later warned city officials of how unsubstantiated rumors quickly grew into demands for his resignation.

"I am responsible for providing the ammunition," he said. "But there are well-organized interests who have run this city for 50 years who pointed the gun; the media and their political agents pulled the trigger."

After several days of negotiations with city officials, Filner agreed to resign effective Aug. 30 at 5 p.m.

Councilmembers David Alvarez, Mark Kersey, Lorie Zapf, Marti Emerald, Kevin Faulconer and Council Pro Tem Sherri Lightner and Council President Todd Gloria approved the settlement after listening to an hour of public comment.

In possible claims against the city/Filner involving current and former employees, volunteers or contractors, the city will provide a joint legal defense for the city and Filner through the City Attorney’s Office.

Under the agreement, the city will dismiss its cross-complaint filed against Filner in the sexual harassment lawsuit filed by Irene McCormack Jackson.

The City of San Diego also agreed to pay no more than $98,000 total cap for any outside counsel Filner retains for advice.

The City can also seek reimbursement from Filner for any damages it is forced to pay arising out of the mayor's alleged sexual harassment conduct.

The agreement does not include criminal charges, if any.

Filner is not excused from repayment of unauthorized expenditures owed to the City.

The agreement does not include claims made against Filner based on conduct that may have occurred outside his capacity as mayor.

Filner apologized to citizens for the scandal that has consumed the city for two months and had something to say to his accusers who included a retired Navy admiral, a City Hall volunteer, a Marine wounded in combat, a Veterans affairs nurse and a university dean.

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

Attorney Gloria Allred, who represents former mayor's communication director Irene McCormack Jackson, commended her client for being the first of more than a dozen women to come forward.

In a written statement, Allred said Filner "continues to live in his own reality."

She also shared this reaction from McCormack Jackson:

“I'm relieved the City has rid itself of Bob Filner so that he will not be in a position to prey on any more women. My thoughts are with the courageous women, who because they spoke out, galvanized the residents of this great city and its elected leaders to rise up against a serial sexual harasser and a gross abuser of power. Bye bye, Bob. You will not be missed”

Throughout his speech, some of Filner’s supporters would interrupt him with comments or applause. He turned to the audience in council chambers, apologized to those who still backed him and asked them to carry on with his progressive vision for the city.

Filner offered the warning, "the fight for control of this city has become vicious and bloody."

Supporters stood and applauded Filner as he concluded.

“It's a sad day for San Diego but like the Mayor said the fight goes on. We have hope,” supporter Philip Liburd said after the council session.

"This is not the time to be trumpeting a partisan victory, or dancing on Bob Filner’s political grave," Briggs, Frye and Gonzales said in a written statement Friday "We have not “won” anything, as our entire community has suffered dearly, and in a way that transcends politics."

“I hope that you will weigh carefully the offer that is before you and ask yourselves not only what the cost of resignation will be but the cost to each of us of enabling Mayor Filner to remain in office indefinitely," Fink said.

“As citizens we have the right to vote and we have the right to recall,” said Mike McCormack, brother of the former mayor's office employee who has filed the sexual harassment suit. “Please be confident that the people of San Diego will successfully recall Bob Filner.”

“You have failed us. This media circus behind us is because of you. When you did the strong mayor charter and you didn’t figure out how you would be able to impeach a mayor,” recall organizer Stampp Corbin told the council. Watch Video

"I trust that you have brought forward a recommendation that you think is in the community’s best interest," said Lani Lutar, former president of the San Diego County Taxpayers Association. "There is no option in which the taxpayers will not have to pay."

Community activist Enrique Morones called the process a lynching, an execution and a kangaroo court then recalled the words of his late father, “ We will always remember those who stood with us, we will always remember those who stood against us but we will especially remember those that stood by and said nothing.”

“Bob Filner is a very good person,” said Sherman Heights resident Maria Ochoa through a translator. “Where is the justice? Who is behind all of this?”

As for the councilmembers who were absent Friday, a spokesperson said Councilmember Scott Sherman "had a long standing family obligation that couldn't be rescheduled." A spokesperson for Councilmember Myrtle Cole said Cole is attending an educational conference in Washington D.C. that has been scheduled for several months.