This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A former Los Angeles County Sheriff’s Department lieutenant was convicted Thursday of charges related to tipping off West Hollywood massage parlor employees about planned law enforcement raids in exchange for sexual favors, authorities said.

David Smith, 61, formerly of the Sheriff’s West Hollywood Station, pleaded no contest to one misdemeanor count of obstructing or delaying law enforcement and two misdemeanor counts of solicitation of prostitution, according to the Los Angeles County District Attorney’s Office.

“He was immediately sentenced to 150 hours of community service, placed on summary probation for three years and (ordered) to stay away from massage parlors and spas,” D.A.’s Office spokesman Greg Risling said in a written statement.

Smith was originally charged in June of last year with one felony count of conspiracy to obstruct justice and one misdemeanor count of obstruction of justice. If he had been convicted as initially charged, he could have faced three years in state prison.

Smith admitted to having sex at two of the businesses between 2016 and 2017, prosecutors said. He claimed to be performing lawful business inspections at the time.

“He deterred law enforcement from investigating locations he frequented,” Risling said.

In at least one instance, “Smith told a massage parlor manager there may be law enforcement officers near the business and advised her she might want to close for the evening,” he said.

Smith left the sheriff’s department in late 2017, several months before charges were filed against him, then-sheriff’s department spokesman Nicole Nishida told the Los Angeles Times last year. She declined to say whether he left voluntarily or was terminated. Prosecutors described smith as “retired” from the department.

In a 2017 interview with the WeHo Times, Smith was described as a father of five who spent more than three decades working in West Hollywood.

“I love the community,” he told the WeHo Times. “It’s something new every day. It’s not stagnant. This is a fun place to work. There’s always something new to discover and challenges that we have to work on to make it the safest city possible.”