A Janesville man who needs mental health treatment, according to his lawyer, was sentenced Wednesday to serve one year in jail and five years of probation after a police pursuit in December.

Jess A. Hurley, 41, of 1719 Tamarack Lane, pleaded guilty to second-degree recklessly endangering safety, battery to a law enforcement officer and attempting to flee an officer as part of a plea agreement. Several other counts were dismissed and read into the record.

He will have full work-release privileges.

On Dec. 28, Rock County sheriff’s deputies saw Hurley, who had been wanted for an incident 10 days earlier, near a business on Venture Drive in Janesville, according to a news release.

When deputies tried to take Hurley into custody, he put his car in reverse, rammed a squad car and fled the scene, the release states. He ran over a deputy’s foot, but the injuries were minor.

Judge Barbara McCrory at first asked the lawyers for the rationale behind the agreement—which included Hurley’s mental health status, some factual disputes in other charges and his willingness to accept responsibility so quickly—but she eventually ruled in line with it.

McCrory said “we have that hammer” of a prison sentence she could impose if Hurley violates his lengthy probation term on the endangering safety charge.

Matthew Lantta, Hurley’s attorney, said his client “was experiencing a very intense mental health … crisis situation.” After the incident, Hurley was taken to the hospital after harming himself.

Before the most recent incident, Hurley endured the deaths of three loved ones in a short period of time, Lantta said.

Assistant District Attorney Mary Bricco listed Hurley’s criminal history, which includes theft and domestic abuse incidents.

McCrory read from a victim impact statement that said, “He can be a loving, caring man one minute and a complete monster the next.” The letter also called for “intense counseling.”

Bricco said the plea agreement would punish Hurley with a year in jail and let him start getting treatment.

Hurley paused and became emotional when he apologized to “everyone involved.”

He said he wants to “get the counseling that I need and make myself a better person.”

Hurley is not allowed to contact the victims from his cases.

He has two weeks to report for his jail sentence. He has 97 days of jail credit for time served since the most recent incident.