NEW YORK (Reuters) - A New York computer consultant who appeared as a key government witness against the founder of the underground black market website Silk Road was sentenced on Tuesday to 2-1/2 years in prison.

Michael Duch, who earned $60,000 to $70,000 a month selling heroin on Silk Road using the alias “deezletime,” pleaded guilty in December 2014 to conspiring to sell drugs and testified against the site’s operator, Ross Ulbricht, at trial last year.

Ulbricht, who prosecutors said ran the site under the alias “Dread Pirate Roberts,” was convicted in February and sentenced to life in prison in May by U.S. District Judge Katherine Forrest.

Prosecutors said Silk Road generated upwards of $200 million in illicit drug sales in more than two years of operation before authorities shut it down in October 2013.

The site relied on the Tor network, which allows users to communicate anonymously. Vendors and buyers used the digital currency bitcoin as payment in order to conceal their identities and locations.

Duch, 41, will receive credit for the 21 months he has already been in custody.

His lawyer, Samuel Braverman, urged Forrest to release Duch to a drug treatment facility, saying his crimes were all tied to a crippling heroin addiction that he has finally put behind him.

But Forrest said that while she was willing to give Duch a significant break on his sentence, based on the cooperation he provided to the government, it would not be “the right thing” to release him just yet.

Before being sentenced, Duch apologized for his actions, saying his arrest was like “being slapped across the face.”

“This path has been extremely painful, but necessary, and truly I am thankful for it,” he told Forrest.

During Ulbricht’s trial, Duch said his addiction eventually led him to begin dealing the drug on Silk Road, which he had previously used to acquire painkillers. He testified that he did not know the identity of Dread Pirate Roberts.

Duch was arrested in Warwick, New York, on the same day that Ulbricht was taken into custody.