BUFFALO, N.Y. — From the moment parking meter mechanic James Bagarozzo began his scheme to steal from the machines, his life became overrun with quarters. He stashed them in his pockets, in a sack in his truck, in closets at his house.

Over more than eight years, he brought home $210,000 worth of quarters — 10,500 pounds of them — which he dutifully rolled and packed in $500 boxes to be exchanged for cash at banks on his lunch hour.

Additional Photos Former City of Buffalo parking meter mechanic James Bagarozzo leaves federal court in Buffalo, N.Y. after he was handed a 2 1/2 year prison term for stealing $210,000 in quarters from the meters he was supposed to be repairing over an eight year period, Friday, Aug. 16, 2013 in Buffalo, N.Y. (AP Photo/The Buffalo News, Derek Gee)

On Friday, a judge imposed a 2 1/2-year sentence on Bagarozzo, who blamed a gambling addiction and an illness he believed would kill him before he built a nest egg for his family.

“With all its problems, the last thing the city of Buffalo needs is employees who don’t do what they’re paid to do,” U.S. District Judge Richard Arcara said as he rejected a defense plea for home confinement or community service.

From 2003 through 2011, the meter mechanic spent the first half of every workday stealing from 70 to 75 meters, prosecutors said. Rather than fix machines, he broke them so that quarters would collect on top where he could grab them with his hands instead of dropping into the collection canister.

Bagarozzo, speaking purposely but with little emotion, apologized during a brief statement to the court and said he accepted responsibility.

“I have hit rock bottom and I have had to come up with my family and friends,” the 58-year-old said.

A former co-worker, Lawrence Charles, followed Bagarozzo’s lead, stealing $15,000 in quarters over about five years, prosecutors said. He was expected to get 6 months to a year in prison. His sentencing also was supposed to be Friday, but it was postponed until Aug. 29.

The employees came under scrutiny in 2011 after Parking Commissioner Kevin Helfer noticed the city’s new computerized pay stations were bringing in far more money than the old quarter-fed parking meters.

“What may have begun as a theft of nickels and dimes, in the end was the equivalent of a major bank heist,” U.S. Attorney William Hochul said.

Since the arrests, the city’s annual parking meter revenue has increased by more than $500,000, Helfer said.

Police Commissioner Daniel Derenda said the investigation is not over.

“We are looking at other people,” he said.

At the time of his arrest, investigators found $40,000 in cash in the ceiling of Bagarozzo’s bedroom, $4,100 in a dresser and $3,000 worth of quarters in closets in bags and boxes around the house.

Prosecutors said the money allowed Bagarozzo to send his daughters to college and pay off his mortgage, but defense attorney James Harrington said virtually everything was lost at casinos.

“It was rooted really in this spiraling addiction that he had,” said Harrington, who gave Arcara 138 letters of support from Bagarozzo’s friends and family.

In court papers, Harrington wrote that Bagarozzo’s stealing began in 2003 following a serious episode of Crohn’s disease that left him believing he did not have long to live.

“He said he was worried about his wife and two teenage daughters and that they would have little if he died,” the lawyer wrote.

Bagarozzo, who will be allowed to surrender voluntarily, declined to speak with reporters as he left the court surrounded by family.

Send questions/comments to the editors.