An inmate at a California prison beat a convicted child molester to death with a walking cane, authorities said.

Jonathan Watson, 41, allegedly battered the perv, David Bobb, 48, and another prisoner Thursday around 2:30 p.m. at the California Substance Abuse Treatment Facility and State Prison in Corcoran.

Both Bobb and the other prisoner suffered head wounds and were taken to the hospital.

Bobb — who had been serving a life sentence for aggravated sexual assault of a child under 14 years old in San Diego County — died on route. The other inmate, who wasn’t publicly identified, remains in critical condition.

Watson has served 10 years of a life sentence for first-degree murder and discharging a firearm, causing great bodily injury or death.

An investigation into the prison beatdowns is ongoing.

With Post Wires