"It is with much sadness as it has been an honor and a privilege to serve the community and the fine men and women of the City," Hernandez said in a letter directed to the city clerk. "I wish the City well as it continues to move forward."
"I wish to apologize to the community for the inconveniences caused by my personal life," he went on to say. "It was never my intent to damage or inconvenience our City. Although I did not let these issues affect the execution of my duties as an elected representative, I feel submitting my resignation will help continue to heal the city."
Hernandez and Councilwoman Maribel de la Torre took out restraining orders against each other on June 28 after an alleged violent confrontation. They were ordered to stay 100 yards away from each other.
It was just last fall that a married Hernandez, who was then acting as mayor, publicly admitted at a City Council meeting to having an affair with de la Torre. His wife was in the audience.
Hernandez was facing a recall election.
There is a city recall committee seeking the ouster of de la Torre and Mayor Brenda Esqueda, who was accused of being romantically involved with a city police sergeant.
"It's time to break ties from the city of San Fernando and let us, those who do care for the city, continue business," said Mayor Pro Tem Antonio Lopez during a news conference outside City Hall before Tuesday's City Council meeting.
A recall election will cost the city roughly $60,000, and given the city deficit, some residents said Esqueda and de la Torre should resign.
Esqueda has defied that request, saying "I will not be resigning at this time."
De la Torre made a quick exit after the City Council meeting, refusing to speak with reporters.