A former Torrance police officer was given a probationary sentence today for selling dozens of guns illegally while on the force.

Lindley Hupp, a Long Beach resident, was sentenced to three years’ probation with the condition that he perform 10 hours of community service per week for nine months, according to the U.S. Attorney’s Office.

Hupp, 32, pleaded guilty in December to dealing in firearms without a federal license and falsely certifying that he was the buyer of a Glock handgun that actually was intended for someone else.  Hupp sold at least 48 firearms during an 8 1/2-year period while working with the Torrance Police Department and another two in 2011, when he was an auxiliary officer with the Pasadena police force, prosecutors said.

Law enforcement officers are permitted to buy what are known as “off-roster” guns that people without a badge cannot buy directly from a licensed dealer. Three dozen of the 48 guns Hupp sold were “off roster” arms, federal prosecutors said.