By: Harika Maddala, KCRA3

An officer with the San Joaquin County Probation Department suffered burns in Stockton after a man set him on fire, officials said. The man was immediately taken into custody.

According to the Stockton Police Department, the incident happened in the area of South San Joaquin and East Lafayette streets on Thursday afternoon.

A 39-year-old man on Post Release Community Supervision entered the probation department facility with a gas can and a lighter around 2:10 p.m., the San Joaquin County Probation Department said.

In an attempt to detain the man, officers followed him to a nearby parking lot, where a struggle between them led to the man setting one of the probation officers on fire, officials said. Probation officers on the scene put out the flames and detained the suspect.

The probation officer was taken to an area hospital with non-life-threatening burns, but was transferred to UC Davis due to the extent of his injuries, the probation department said.

The suspect was also taken to an area hospital for treatment.