A former U.S. Secret Service agent has been sentenced to nearly six years in prison for stealing $820,000 in bitcoins while investigating the Silk Road, a now-defunct online marketplace for illicit goods.

Shaun Bridges, 33, admitted to money laundering and obstruction charges in August and was sentenced on Monday to 71 months in prison, reported Ars Technica. He has agreed to pay $1.1 million for the theft.

U.S. District Judge Richard Seeborg told the court that the maximum sentence was necessary because he believed Bridges' behavior represented a "shocking and reprehensible abandonment of his public duty."

"This, to me, is an extremely serious crime consisting of the betrayal of public trust by a federal law enforcement agent. And from everything I see, it was motivated entirely by greed. No departure or variance is warranted in this case," he said, according to RT.

Bridges was part of the Secret Service's electronic crimes task force and had been assigned to serve on the Baltimore Silk Road Task Force.

Under the plea deal, Bridges admitted to illegally accessing the Silk Road site and siphoning around 20,000 bitcoins into an account under his control at the Mt. Gox digital currency exchange website, which has since closed. The bitcoins were worth about $350,000 at the time but appreciated and were sold for $820,000. They were worth about $8 million at the time of Bridges' sentencing.

Bridges was able to gain access to various Silk Road accounts by convincing Curtis Green, a customer service rep for the website who had started cooperating with investigators, to explain how to change account passwords on the site. Bridges then used Green's account to steal from wallets.

He pled guilty the same month that former Drug Enforcement Agency agent Carl Mark Force IV was sentenced to federal prison for also going rogue during the Silk Road investigation. Force was charged with extortion, money laundering and obstruction of justice and was sentenced to 78 months in federal prison, according to Coin Desk.

Bridges will report to prison on Jan. 29, according to The Wall Street Journal.