Updated

An Ogden police officer hailed for helping to end a deadly Salt Lake City mall shooting nearly two years ago has resigned amid allegations of sexual misconduct with a minor.

In a one-sentence statement issued Monday, Ogden police said patrol officer Ken Hammond resigned from the department Friday. No other comment was offered.

Brenda Beaton, Hammond's attorney, said he resigned when he learned the department planned to fire him.

"Ken really felt he had spent years as a dedicated servant ... It's very discouraging," Beaton said. "They certainly took advantage of any good publicity he brought the department."

Ogden City Attorney Gary Williams declined to comment.

Hammond was charged Dec. 29 with a third-degree felony count of unlawful sexual conduct with a 16- or 17-year-old. Charging documents say the allegation stems from a July 12, 2005, report but other details have not been released.

Hammond is scheduled for an initial court appearance on Jan. 27.

The 35-year-old had been on paid leave pending an internal police investigation. He had worked for the Ogden department for about eight years.

Hammond was off duty and having dinner with his wife at Salt Lake City's Trolley Square mall on Feb. 12, 2007, when teenage Bosnian immigrant Sulejman Talovic began randomly shooting shoppers, killing five of them.

Hammond ran to the site of the shooting and engaged Talovic in a gun battle, giving Salt Lake City police time to arrive. Talovic was killed by Salt Lake City officers.

Hammond was labeled a hero and decorated with state and national honors.

Beaton said Hammond already has been offered a new job. She declined to say whether the position is with another police agency.