Correction: An earlier version of this article incorrectly said that David Vines was charged with contempt because of a failure to appear in court last year. Vines was charged at 4 a.m. Nov. 2 after police found him in violation of a court-ordered curfew. This version has been corrected.

A District man who broke into so many cars he even called himself a “thief” and an “old fool” as he pleaded for leniency was sentenced Friday to four years in prison on theft and contempt charges.

D.C. Superior Court Judge Ronna L. Beck told David Vines that he was a “plague” on the community, rejecting his request for just a year behind bars.

“It’s appalling what people have had to put up with because of your behavior,” she said as she sentenced him. “Our community needs to be protected from you.”

Vines, 48, has been arrested 59 times in 30 years. In the past decade, prosecutors say, he has specialized in breaking into cars on Capitol Hill.

Although he has previously served jail time, Friday’s sentence was his stiffest yet and a victory for the Capitol Hill community that has worked to stop him. Police and prosecutors mounted a vigorous effort against Vines as part of a push to combat nuisance crime in the District.

The majority of car break-ins are committed by a handful of offenders who sometimes hit dozens of vehicles in a night, authorities say. Catching such thieves can be difficult, and when police do, the thieves often cycle in and out of jail.

In an effort to stop that cycle, about 30 residents wrote letters to the judge detailing the financial and emotional toll of mass car break-ins in the community, including lost work time and a diminished sense of safety. Prosecutor Thomas Bednar wrote an 18-page sentencing memorandum and brought two large maps into court showing where Vines had struck over the past several decades.

“Each time he’s been before a judge, he has thumbed his nose at the court and went right back to committing crimes,” Bednar said Friday.

Vines spoke at length during the hearing, detailing his life of addiction and crime, and saying he was often drunk or high on cocaine when he broke into cars. He said he was 9 the first time his father gave him a drink.

Vines asked for a year’s sentence, the minimum mandatory, saying he has liver cancer and doesn’t want to die in prison. He said that his crimes were not violent and that when he broke into cars, he simply checked for unlocked door handles rather than smashing windows. His score from a car was often a handful of change or a few T-shirts.

“I never hurt nobody,” Vines said. “I’m just a small-time thief. I admitted it. I did what I done, and it’s wrong.”

He said his hope was to get into drug treatment and turn his life around.

“I’m a grown man now. I want to be a role model. I don’t want young people to grow up and be like me,” he said. “I’m an old fool.”

Beck said that she thought Vines was in a “very sad situation” and that she found him to be a sympathetic person. But she was, nevertheless, compelled to lock him up for longer than a year.

“This sentence is not as much punishment as it is incapacitation to not have you in the community as the plague you have been,” Beck said.

She also reminded Vines what he was being sentenced for. The theft charge was for a break-in in October; the contempt charge stemmed from his violation of curfew last year. In a hearing before Beck in November, Vines told her that he was having trouble getting medical care in his halfway house. She said she would look into it, and he promised to return the next day to discuss his options.

But he never made it because he was arrested again, charged with breaking into another car. That was his 59th lockup, and his score was about $20 in loose change and Metro cards.

“You have argued that you are a small-time thief, but your conduct has had a large impact on our community,” Beck said. “The impact can’t be written off as small-time.”