OCEANSIDE  Oceanside City Manager Peter Weiss announced Wednesday that he will step down at the end of the year, ending his 27-year tenure with the city.

Weiss, 54, received a standing ovation from the public and council members shortly after announcing his resignation during Wednesday’s council meeting.

“Over the years, the City of Oceanside has provided me with great opportunities, both personally and professional,” Weiss said, reading from a letter he had submitted to the council. “I want to thank the council for your commitment to the community and the support you have provided myself and staff.”

In his statement, he gave no reason for his departure or any indication of what his future might hold. Outside the meeting, when asked by a reporter why he decided to resign, Weiss simply said: “It was time.”

Mayor Jim Wood said he was “shocked.”

Weiss has been city manager in Oceanside since 2007, but was first hired by in 1986 as an assistant civil engineer. He later served as deputy city engineer from 1992 to 1995 and city engineer from 1995 to 2000, then was named public works director in April 2000, according to the city’s website.

Wood jokingly said the often-divided City Council may have had something to do with Weiss’s decision to leave. “He didn’t have any gray hair when he started as a city manager and I guess that says it all,” Wood said.

In his letter, Weiss said the city is in a far better position than it was several years ago — when officials were projecting annual deficits of $9 million or more.

“We all recognize that difficult times are still ahead,” he said. “However, I believe that the stage has been set to meet those challenges without sacrificing services to the community.”

As city manager, Weiss earns a salary of roughly $223,000 per year, plus benefits and other perks. His resignation is effective Dec. 27.

Councilwoman Esther Sanchez said it will be tough finding someone to fill his shoes.

"He’s been able to survive all these years of us. And he has done it in a way that is respectful to our community, our businesses and our residents,” she said.