A San Jose man accused of stealing, torturing and killing cats in the Cambrian Park neighborhood last year pleaded guilty Tuesday to 21 felony counts of animal cruelty.

More than two dozen people showed up at Santa Clara Superior Court in San Jose to watch Robert Roy Farmer, 25, enter his plea. Many of them have been following the case since the outset.

“This is good, essentially we have an early resolution of the case,” Deputy District Attorney Alexandra Ellis told the crowd in the hallway outside the courtroom after the proceeding.

“There is no plea bargain, so now [sentencing] is up to the judge,” she said. “This is the same effect as if he’d been tried and found guilty of all these crimes.”

Farmer has been in custody at the Elmwood Correctional Facility in Milpitas on $225,000 bail since he was arrested on Oct. 8, 2015. San Jose police found him sleeping in his car with a dead cat that day.

A necropsy report concluded the orange female tabby cat in Farmer’s car had died of blunt force trauma and may have also been sexually abused. Crime laboratory documents showed a DNA match between Farmer and the cat.

Farmer’s plea stunned some of the pet owners and animal rights advocates who showed up.

“I was shocked, really,” said Pam Decharo, who has attended many of Farmer’s court dates. “I thought he’d make a plea bargain. He had an attorney and I thought he’d try to get out of some of it.”

The next court date has been scheduled for Dec. 8, at which time Superior Court Judge Sharon A. Chatman is to receive all relevant case reports so she can later determine a sentence.

One court attendee asked Ellis whether it is possible for Farmer to be sent to a mental institution instead of prison.

“That is all up to the court,” Ellis replied. “Everything will be laid out for the court, both by the defense counsel and by the prosecution. The victims will also have an opportunity to speak.”

Miriam Petrova, whose cat GoGo was stolen by Farmer from her front porch and is still missing, told the Bay Area News Group she plans to attend the sentencing and speak on behalf of her beloved pet.

“I promised my cat,” Petrova said. “I will defend him. We’re still looking for him.”

In addition to the animal cruelty charges, Farmer pleaded guilty to one count each of misdemeanor battery and being under the influence.

The sentencing is expected to take place early next year, according to Ellis. Farmer could face up to 16 years and 4 months in prison.