When Roberto Hernandez was 17, surveillance cameras caught him burning a caged cat alive, then feeding its charred corpse to his pit bulls.

He pleaded guilty to felony animal abuse and prosecutors wanted him to spend 364 days in jail.

Circuit Judge Nushin Sayfie disagreed. She sentenced Hernendez, now 19, to five years of probation.

His defense claimed he thought the cat was actually a rabid raccoon that had been terrorizing local farm animals, according to the Miami Herald. But a witness told police she was certain it was a cat.

Prosecutors said the video showed Hernandez cage a stray cat, pour flammable liquid all over it and ignite it with matches. They told the court he enjoyed a drink while he watched it burn alive.

Even so, Sayfie opted for probation because she reviewed the video and believed Hernandez’s defense.

“I don’t think a raccoon should be treated in that manner,” Sayfie said. “I don’t think jail time is appropriate.”

Sayfie’s said prosecutors rarely seek such jail sentences for third-degree felony cases of first-time offenders.

“I find it curious that in this case, the state is seeking jail time when apparently human victims don’t warrant the same approach,” Sayfie said.

Hernandez received a “withhold of adjudication,” meaning he won’t be considered a felon. He must undergo a psychological evaluation in a year and report to a judge every month.

In a statement, Miami-Dade State Attorney Katherine Fernandez Rundle said she was disappointed by the ruling. But she expressed hope Hernandez will adhere to psychological treatment with a qualified physician.

“As I have said many times, research shows that individuals who commit acts of cruelty against helpless and trusting animals don’t just stop there,” Rundle said. “Many of these individuals move on to commit violent acts against their fellow humans.”