Robert Roy Farmer may have to register as a sex offender after he killed 21 cats in 2015

A man who killed 21 cats and sexually abused a dead one has been sentenced to 16 years in prison.

Robert Roy Farmer, 25, was sentenced on Friday in Santa Clara, California, where a judge gave him double credit for 21 months already served. He will not have to register as a sex offender once released.

Before the sentencing, Farmer's attorney Wesley Schroeder read aloud a letter to the court written by his client.

'It feels like another man committed these crimes, but I know it was me,' the letter said, according to the San Jose Mercury News.

'I stole a member of their family. The fact that I was out of my mind was no excuse,' the letter went on.

Last year, Farmer (pictured in court) pleaded guilty to 21 counts of felony animal cruelty. On Friday, he was sentenced to 16 years in prison

Farmer, the son of a retired San Jose Police captain, was arrested October 8, 2015 after a month-long killing spree.

His lawyer has said that he was on methamphetamine at the time of the crimes.

Cops found him in a Home Depot parking lot, sleeping in his car with a dead cat curled up in the center console.

In his car, police found chunks of fur, blood, fur-covered gloves, a hunting knife and the collars of other cats.

A San Jose Animal Care and Services necropsy report determined the orange female tabby cat found dead in his car of blunt force trauma had dilated genitals.

The report also showed that a DNA match between Farmer and the cat was found under its claws. DNA tests linked Farmer to all 21 cats that were killed.

Farmer's attorney, Wesley Schroeder, argued that there was no evidence of a sexual motive, saying in an email to NBC that the '(tuolidine blue) test designed to highlight abrasions or subtle trauma from sexual assault failed to show any evidence of even the most minuscule trauma.'

Victim: Go-Go's (pictured) owner, Miriam Petrova said they never found her 17-year-old cat's body. Only four of the animal's bodies have been recovered

Investigators said Farmer rounded up the cats, that he sometimes mutilated and abused, from Cambrian Park over a two-month period.

Surveillance video captured Farmer in the act as he chased and picked up one cat named Go-Go, leading police to him, according to ABC 7.

'Farmer just took our sense of safety because he took it from our front yard,' Miriam Petrova told NBC in 2016.

Petrova's 17-year-old cat Go-Go, was one of Farmer's first victims. 'We never found Go-Go's body,' she said. Only four of the animal's bodies have been recovered.

Residents had urged the judge to sentence Farmer to life in prison, asking supporters to sign onto 'Justice for our CATZ.'

The 16 year sentence he received was the maximum sentence for his crimes.