An East Williston man who admitted he sold an assault rifle and other guns to drug dealers to support his crack habit has been sentenced in Connecticut to 18 months in federal prison, officials said.

Scott Liff, 47, also will be on supervised released for 3 years after finishing his term, the U.S. attorney in Hartford said Tuesday.

Liff had pleaded guilty on July 27, 2015, to a single count of possession of a firearm by an unlawful user of a controlled substance, prosecutors said.

Police in Bridgeport, Connecticut, began investigating Liff after they made an arrest in 2012 and another in 2013 where the weapons used were registered to Liff, prosecutors said in a news release.

advertisement | advertise on newsday

“The investigation revealed that Liff had a crack cocaine addiction during the time at which he owned the firearms,” the news release said.

“Liff subsequently admitted to law enforcement that he had sold as many as 10 guns, including an assault rifle, to drug dealers in Brideport and elsewhere in exchange for crack cocaine,” the release said.