A Madison man was sentenced Wednesday to 87 months in federal prison for drug and firearm convictions, according to a state Department of Justice release.

David T. Taylor, 26, was sentenced for possessing 15 grams of heroin with intent to distribute and possessing two firearms as part of that drug offense, according to the release. Taylor pleaded guilty to the charges on March 13.

Madison police responded on Nov. 19, 2013, to a domestic violence call that had occurred several days earlier, officials said. When the victim was explaining the incident, they told officers that Taylor had posted a photo of himself on Facebook with a handgun that had an extended magazine. Officers confirmed the photo was posted, and they knew that Taylor, a convicted felon, had an outstanding arrest warrant for a probation violation.

Officers found Taylor at an apartment complex and arrested him, according to the release. A search warrant was executed at the apartment that Taylor had been staying at, and officers found a .40-caliber Glock pistol with an obliterated serial number and extended magazine, a .45-caliber Colt pistol, heroin and packaging material.

Taylor’s DNA was identified on both firearms and the packaging that contained the heroin, officials said. Taylor’s phone also held photos of the firearms and narcotics. When Taylor was arrested, he had $1,600 in his pants pockets, and police said he has never been gainfully employed.