Elaine Forbes, who was arrested weeks after becoming Sausalito city manager in July, has resigned, the mayor announced.

“We have accepted her resignation, and she is no longer employed by the city,” Mayor Steven Woodside reported after a closed City Council session on Tuesday.

Brandon Phipps, who has been the acting city manager since Forbes went on leave, will be interim city manager for the next six months, Woodside said. Before the upheaval, Phipps was assistant city manager and previously director of the Community Development Department.

“Given the fact that we are in an election season and there perhaps will be some change in council going forward in the next year, it is anticipated that there will be a recruitment, and we would hope that Mr. Phipps would be a candidate,” Woodside said.

“I’m honored by your confidence and very grateful for the opportunity to continue serving the city in the role of interim city manager,” Phipps said at the council meeting. “I really look forward to working closely with this council, our very talented staff, and with the community to stabilize the organization and to continue to advance the city’s priorities.”

Forbes, 53, who has a floating home in Sausalito, was arrested on July 18 when she was discovered on a yacht in a different marina. Sheriff’s deputies booked her on suspicion of burglary, a felony, with a bail amount of $50,000.

The Marin County District Attorney’s Office charged her with four misdemeanors: two counts of unauthorized lodging on different boats; one count of prowling; and one count of petty theft of personal property. Authorities allege she stole a woman’s clothing.

The arrest happened two days after the Sausalito City Council met in closed session and granted Forbes a two-month leave of absence. The city did not explain the reason for the leave.

Forbes had just started the $275,000-a-year job on July 1. Previously, she was the executive director at the Port of San Francisco for nine years, overseeing a staff of about 270.

In mid-August, Randall Knox, her defense lawyer, entered pleas of not guilty to the charges in Marin County Superior Court and said Forbes plans to apply for a diversion program. Family members said Forbes had a mental health crisis.

Judge Ahtossa Fullerton set a Sept. 30 deadline for Forbes to apply to the county mental health program. If she is accepted and completes the program, she could avoid a criminal conviction.

“She is getting the help she needs,” Knox said after the court hearing. “She understands that she needs the help and she wants it. This was so out of character for her.”

On Tuesday, Woodside said, “Our hearts are with Elaine and her family, and we stand behind her as she takes this time to focus on her health and healing.”

“I want to thank the people of Sausalito for your sympathy and for your patience during this time,” he said. “This was an extremely sensitive matter, and I am grateful for the respect and compassion you have shown to Elaine and her family. It is very much appreciated.”

Forbes replaced Chris Zapata, who held the job for five years and is now an assistant county executive. With the county’s consent, Zapata is temporarily serving as an adviser to the city.

Forbes was raised in the Bay Area and attended Bahia Vista Elementary School and Davidson Middle School in San Rafael.