A Madison man was sentenced Thursday to federal prison for distributing crack cocaine, according to a state Department of Justice release.

Jermaine Greer, 37, was sentenced to 42 months in federal prison for a charge he pleaded guilty to on Dec. 4, according to the release. This is his second felony drug conviction.

Between April 22 and Aug. 19 an undercover officer bought heroin and cocaine from Greer eight separate times, according to the release. Greer conducted transactions involving 30 grams of cocaine and 17 grams of heroin.