A Janesville man being treated for mental problems pleaded no contest to lewd conduct and was sentenced to 18 months of probation in Rock County Court on Wednesday.

Lee A. Poffenberger, 38, had been charged with third-degree sexual assault for an incident in which he was accused of ejaculating on a woman’s shirt in Beloit on Aug. 26.

Poffenberger told police he believed the woman was a prostitute. He invited her into his car, where he was viewing pornography on his phone, and he ejaculated, according to the criminal complaint.

As part of a plea agreement, the felony sex-assault charge was dismissed, and Poffenberger pleaded no contest to a misdemeanor, lewd and lascivious conduct, and bail jumping.

The sentence included a separate case in which Poffenberger pleaded no contest to criminal damage to property and a charge of battery was dismissed.

In that case, Poffenberger was accused of pushing a woman from her bicycle on the Janesville bike trail July 3, thinking she was a woman responsible for putting his friend in jail, said Assistant District Attorney Anne Nack.

Poffenberger had been listed as homeless at the time of the offense, but the state sex offender registry now lists his address as 153 S. Jackson St., No. 2B.

Nack said in the Beloit case, witnesses gave differing stories, the victim could not be located, and a gas station video that could have helped was not available.

Defense attorney Kelly Mattingly said the Beloit case started as what Poffenberger intended to be a consensual act of prostitution.

Poffenberger is being treated for “psychological conditions,” and his diagnoses were likely factors in both cases, Mattingly said.

Mattingly said Poffenberger will be closely monitored on probation, and he hoped Poffenberger’s recently changed medication would help stabilize him.

Poffenberger was convicted of first-degree sexual assault in 2004 and is a registered sex offender.

Judge John Wood said no matter whose story was correct in the Beloit case, Poffenberger committed a crime, “and as a previous sex offender, I’m sure you know that, and quite frankly that’s disturbing to the court.”

Wood said the case suggests that previous attempts to rehabilitate Poffenberger didn’t work, “and that troubles me because it certainly puts our entire community at risk.”

Wood said he hoped Poffenberger’s new treatment and medication would keep him from reoffending.

A restitution hearing will be held to determine what Poffenberger should pay for damage to the bicycle.

CORRECTION: On Jan. 17, this story was changed to reflect the following.

A story on Page 6A in Thursday's Gazette gave the wrong the disposition for bail jumping charge in a Rock County Court case.

Lee A. Poffenberger, 38, Janesville, pleaded guilty to lewd and lascivious conduct and bail jumping, while a charge of third-degree sexual assault was dismissed in connection with an Aug. 26 incident in Beloit.