A former Erie County sheriff’s deputy who admitted using cocaine with gang members was sentenced Thursday to six months home confinement and three years on probation.

Thomas M. Blajszczak, 44, had previously pleaded guilty to unlawful use of a controlled substance while in possession of a firearm.

Blajszczak resigned from the sheriff’s department in 2009 – he was assigned to the jail in Alden – after federal agents questioned him about his association with the 10th Street Gang.

“There’s no words to describe my regret,” the former deputy told U.S. District Judge Richard J. Arcara.

Assistant U.S. Attorney Joseph M. Tripi did not oppose the non-jail sentence recommended by defense lawyer Joel L. Daniels, and told Arcara that Blajszczak’s actions were the result of immaturity.

Blajszczak’s conviction stems from the fact that, while working as a deputy, he used drugs in the presence of gang members and allowed them to handle several of his guns. He also admitted giving them ammunition.