A day after John Hemmerling lost a daily newspaper’s endorsement for county sheriff, he suddenly quit as a top prosecutor with the San Diego City Attorney’s Office.

“I retired so I could focus full time on my race for sheriff,” Hemmerling told Times of San Diego on Thursday.

He said he was disappointed with a 1,500-word editorial Wednesday in The San Diego Union-Tribune rescinding its endorsement of him.

“I’m sorry if my comments were taken to imply criticism of anyone based on their sex or gender identity,” Hemmerling said via email Thursday evening. “My sole intent was to express concern about the overbroad nature of the Board of Supervisors’ recent ordinance.”

The 56-year-old Republican’s exit followed remarks he made April 30 at a candidate’s forum in Ramona taped by Times of San Diego.

Dave Myers, a Democratic candidate for sheriff, tweeted a link to an audio, and tagged the Union-Tribune, in which Hemmerling refers to transgender women as “those men.”

In its editorial Wednesday, the U-T opinion section said: “Transgender women are women, not men. And transgender women are people, not political pawns to be mocked or used to score cheap points with conservative crowds — or thrown into jail cells where they will distrust the sheriff who has made such comments and fear what will happen to them in that sheriff’s system.”

The Editorial Board said it twice called for the removal of a county commissioner with anti-transgender views.

“We also value due deliberation and wanted to hear more from Hemmerling before revisiting our endorsement,” said the piece on the officially nonpartisan race.

Online, the paper ran audio of a half-hour phone chat between Hemmerling and Editorial and Opinion Director Matthew T. Hall to give “him a chance to explain himself and his comments.”

But the paper said Hemmerling, endorsed by the local GOP, offered no apology and didn’t make a public statement of regret.

“He used the word ‘mistake’ once and ‘sorry’ six times in saying it was a misstep by an unpolished first-time politician who was trying to shoehorn into a brief speech an issue that some in the crowd had asked him about beforehand,” the editorial said.

It added: “It was more than a misstep by a novice politician who seemed to us to be the best candidate of three. When people first say what they believe, believe them. Transgender people are among the most vulnerable behind bars, and denying them their very humanity is a disqualifying trait for a sheriff.”

A spokeswoman for the City Attorney’s Office said: “Our office does not comment on personnel matters.”

Hemmerling has been assistant city attorney of the criminal and community justice division. Before joining the City Attorney’s Office, he served as a San Diego police officer for eight years. He retired in 2014 from the Marine Corps Reserve after 30 years of service in which he attained the rank of colonel.

Undersheriff Kelly Martinez didn’t respond immediately to a request for comment. Neither did another sheriff candidate — Republican Jonathan Peck.

But Myers, endorsed by the local Democratic Party, told Times of San Diego: “Sheriff’s leadership has completely collapsed leading to historic record deaths in custody, another inmate died in custody yesterday.

“At this rate, in-custody jail deaths will exceed 50 at years end. In the last two years, our region experienced a double digit increase in hate crimes yet Undersheriff Kelly Martinez increased clerks to issue more concealed gun permits.

“Any hateful or hurtful speech, especially anyone desiring public office must speak forcefully against hate and discrimination.”

In response to Times of San Diego questions, Hemmerling said: “Hopefully this will be the catalyst for a broader discussion of this complex and divisive issue. I am confident that I will emerge in the top two in the June 7th primary.”

Hemmerling expressed no hard feelings about Myers highlighting the Ramona remarks.

“I respect Dave Myers, and he has a right to his opinion,” he said.

He added: “As the endorsed Republican, I am about law and order. I am committed to providing security and safety for all. No other candidate can match my breadth of experience, as a combat Marine, decorated San Diego police officer, and chief criminal prosecutor for the past six years. I am very confident that I will emerge from the primary and advance to victory in the general election.”