San Diego Mayor Bob Filner has agreed to resign as part of a deal reached this week with city officials, NBC 7 News has learned.

Filner, spotted leaving City Hall with packing boxes Wednesday night, will formally vacate the office following a closed session of City Council Friday, according to several sources.

Filner's attorney has a letter of resignation drafted for his signature upon approval of the tentative settlement by councilmembers.

The mayor said goodbye to his staff Wednesday before he left his office at City Hall in his security detail’s SUV. Sources say the packing boxes in the backseat contained Filner's office effects.

City officials announced just before 7 p.m. Wednesday a proposed solution had been reached in the scandal that has consumed the city of San Diego since it first broke July 10.

The firm Payne & Fears issued a statement on behalf of Filner Thursday afternoon: "Due to the confidential nature of mediation and settlement discussions, we are unable to comment or make statements about any of the terms." Read the full statement here

A public announcement will occur following the closed session according to Filner's attorneys but they don't identify who will make the statement.

“I would encourage people to refer back to the City Attorney’s comments yesterday that much of the speculation cannot be confirmed until the Council is able to meet,” said City Council President Todd Gloria.

“This is a legal settlement we’re considering,” Gloria said.

In the last six weeks, more than a dozen women have come forward with tales of alleged sexual harassment and unwanted sexual advances.

Filner has admitted to disrespecting and at times intimidating women, saying that he needed help. He announced he would enter a treatment program for an undisclosed disorder or illness.

Under investigation for alleged “pay to play” schemes with developers, Filner disappeared from public view for three weeks and surfaced Monday in time for a mediation session with city officials.

Over three days of negotiations in the downtown San Diego high-rise located just blocks from City Hall, officials reached a deal.

U.S. Rep. Scott Peters speculated the agreement involves picking up Filner's legal fees. “The hard thing for the City Council is going to be, he’s not going to leave for free,” Peters said Thursday.

Attorney Gloria Allred, who represents the mayor's former communication director Irene McCormack Jackson, described an agreement that would exchange payment of legal fees for Filner's resignation as “callous and unholy.”

“There should be no payoff for Mayor Filner,” Allred said.

"If the deal required that the city council pays him one dollar, then I for one think they should vote against it."

Councilmember Scott Sherman said he'll need to see the details of the deal before making a decision.

On the one hand, he'd like to see the voters voices be heard through the recall process but it's not guaranteed the recall effort will be successful, he said.

“If we’re looking at a small bit of attorney’s fees and maybe a payout to a couple of these victims and we’re absolved of everything else then yeah, I’d much rather have the mayor out that way,” Sherman told NBC 7 News.

As with any negotiations, until the agreement is approved and signed, it’s still tentative.

At several times during his time as mayor, Filner has come to terms with an opponent only to change his mind.

For example, Filner agreed to a deal with the Tourism Marketing District then refused to adhere to the terms.

He also pulled permits for a remodeling project by Jack-in-the-Box in North Park and meddled in the development of a multi-unit complex called CentrePointe.

Once the agreement is approved by Council and Filner resigns, San Diego city government will enter a period of interim leadership.

Council President Todd Gloria will take on the role of acting mayor under the city charter. According to the charter, Gloria would not give up his position on the Council during this time.

Read the city charter here

There could be at least one primary special election within 60 to 90 days.

Filner, a Democrat, was asked by his own party chairperson to resign amid allegations of inappropriate behavior with women. Earlier this week, The Democratic National Convention leadership announced its members would vote on a resolution regarding Filner Friday at their meeting in Scottsdale, Ariz.

On Friday evening San Diego Councilmember Kevin Faulconer released the following statement regarding Friday's closed meeting:

“Protecting taxpayers has always been my top priority. This case is no different. I joined these mediation discussions to ensure the City gets the best deal possible for taxpayers. We must put this civic dysfunction behind us and return to providing City services to San Diegans.”

Read Related Stories: