A serial auto burglar charged with ransacking at least eight vehicles during a year-long smash-and-grab spree in San Francisco was sentenced to four years in state prison on Wednesday.

Deshawn Patton, 21, accepted the sentence as part of a re-negotiated plea with Superior Court Judge Christopher Hite, ending a complicated case that has been watched closely by neighborhood anti-crime groups.

Hite had previously worked out a lenient deal with Patton that would have allowed Patton to get out of jail on three years of probation, angering courtroom observers who have followed the case amid an unprecedented car break in epidemic in San Francisco.

But in August, as the judge was in talks with Patton and his attorney, Lisa DewBerry, the San Francisco Adult Probation Department submitted its pre-sentence report to the court that showed that Patton had a “high risk for future violence,” Hite said.

The report contained an “extra record” and “considerably more information” that the court was not previously privy to, Hite said. The judge would not elaborate on the new information that persuaded him to rethink the original plea deal. Adult probation reports often use a defendant’s juvenile record in the recommendation.

Patton, a San Bruno resident, has been held in county jail since November. When accounting for the time he’s already served, he will do around 9 months in state prison.

“I think we had some justice today,” said Jeff Wayman, one of 15 members of Stop Crime SF who were in the courtroom gallery during Wednesday’s hearing. “I still think the sentence is light, but it’s better than what we were looking at.”

DewBerry left court without speaking to reporters. Patton declined to say anything at sentencing.

San Francisco’s auto-burglary wave hit an all-time high last year with more than 30,000 reported cases. San Francisco police make arrests in such cases only around 1.6 percent of the time, according to department statistics, meaning cases like Patton’s are comparatively rare.

Auto break-ins, though, have declined 15 percent this year compared to the same time last year as police have made the problem a priority.

Patton’s auto-burglary binge took place between April 2016 and May 2017. All of his victims were from outside San Francisco — some from as far away as China and Germany — and six of the vehicles he hit were rental cars, prosecutors said.

The case was unusual because Patton had been arrested several times during the spree but bailed out each time. In two cases, his bail was set at over $200,000, Hite said.

Rather than proceed individually with each case, the San Francisco district attorney’s office presented them to a grand jury and secured a 20-count indictment — including 11 felonies — against Patton in April.

At the time, Patton was in San Mateo County jail on a felony residential burglary case and was transported to San Francisco jail, Hite said.

The judge said he initially offered Patton the deal of probation because the defendant had never previously been on adult felony supervised release.

If Patton had violated the terms of his probation under the initial deal, he would have been sent back to jail for more than three years and would have had 10 felonies on his record.

The district attorney office had offered Patton five years and eight months jail time — which would amount to less than two years of actual time served — and said it would dismiss some of the charges if he agreed to plead guilty.

Hite also noted that a jail-appointed psychiatrist found that Patton had “low-to-average range” mental processing.

Evan Sernoffsky is a San Francisco Chronicle staff writer. Email: esernoffsky@sfchronicle.com Twitter: @EvanSernoffsky