In cyberspace, no good deed goes unpunished.

Two federal agents with lead roles in the investigation to take down Silk Road, the international Internet black market and drug bazaar, allegedly stole proceeds from the underground site, in the form of bitcoin, and hid their illicit earnings while conducting the investigations.

The Daily Beast has learned that one of the agents also allegedly leaked information to the Silk Road operators about Mark Karpeles, CEO of the now-defunct Mt. Gox (Tokyo), once the world’s largest bitcoin exchange, who had been cooperating with the investigation and the authorities.

The agents also appear to have made an attempt to extort funds from Mt. Gox or do business with it, which Mt. Gox refused to do, before the U.S. government seized $2 million from the company’s U.S. accounts. It is a seizure that now seems more motivated by personal interest, or the rogue agents covering their tracks, than the pursuit of justice.

The latest revelations raise questions about the events leading to the collapse of Mt. Gox and are likely to put a chill on those who might wish to cooperate with government investigations in the future.

According to court documents and government sources, both agents were leads on the federal investigation into Silk Road. Former DEA special agent Carl Mark Force IV, who was arrested Friday, allegedly asked Silk Road administrator Ross Ulbricht to pay him $250,000 in bitcoin not to disclose information to the government. Force also is alleged to have given information that Mark Karpeles shared with authorities to Ulbricht in exchange for money.

U.S. government sources told The Daily Beast that they believe the rogue agents also were the first to inform Ulbricht that Karpeles was cooperating with the investigation and that Karpeles had shared information on potentially illegal activities with federal authorities in the past. Shaun Bridges, a former special agent with the Secret Service who resigned March 18, is accused of stealing more than $800,000 worth of bitcoin that he controlled during the investigation. He surrendered to authorities Monday and insists he is innocent.

The feds shut down Silk Road and arrested Ulbricht in October 2013. Ulbricht was convicted of drug running in 2015. During his trial, he accused Karpeles of being the real mastermind behind Silk Road.

Emails reviewed by The Daily Beast and court documents suggest that Force attempted to become the U.S. representative of bitcoin with Karpeles before the government seized control of the firm’s U.S. accounts.

Mt. Gox went bankrupt in February 2014 after the firm discovered that $500 million worth of bitcoin had vanished. The Tokyo Metropolitan Police Department formally began investigating the case on March 27, 2014.

However, as early as 2011, Karpeles had proactively contacted U.S. and Japanese law enforcement and attempted to keep them posted on suspicious activity, including the use of fake passports to open accounts. Despite Karpeles trying to collaborate with U.S. law enforcement, he ended up having the facts of his role in the investigation disclosed to Silk Road operators and also appears to have been the victim of an attempted shakedown.

In a letter sent via Federal Express to the Drug Enforcement Administration on June 10, 2011, and received by the agency on June 13, 2011, Karpeles wrote:

“We are a Japanese securities exchange known as Mt. Gox and are contacting you in light of the recent media excitement surrounding Bitcoin.

“It has been brought to our immediate attention that there are US senators calling for quick and firm action from the DEA to shutdown illegal narcotic and international drug trafficking services that are facilitated by a website known as the ‘Silk Road’.

Firstly, we would like you to be aware that we do not condone the use or trafficking of illegal substances, nor does our Bitcoin exchange directly or indirectly endorse the use of such services. Ultimately, we are pursuing a goal of accepted legitimacy, both for Bitcoin and our exchange. We are more than willing to comply with any court-sanctioned investigations regarding our services.

We invite you to contact us.”

U.S. law enforcement sources confirmed that Karpeles cooperated with their investigation on several occasions. They also confirmed that one of the rogue agents had given Karpeles’s name and information on his cooperation with the investigation to the operators of Silk Road in exchange for a large payment in bitcoin during the investigation.

However, emails provided by Karpeles suggest that former special agent Force attempted to become business partners with Mt. Gox, as well. Federal law enforcement sources said they were unable to publicly verify the emails were from Force but that they are investigating and believed they are authentic.

According to the emails provided by Karpeles, on April 8, 2013, Force attempted to make contact with Karpeles through a LinkedIn invitation. The message Force sent to Karpeles even mentioned that he was a DEA special agent. After being ignored, Force allegedly attempted on multiple occasions to partner up with Karpeles. He resigned from the DEA in May.

On April 11, 2013, Force wrote to Karpeles, “I don’t think we connected on LinkedIn? I wanted to ask you if you could back me on a deal with 250 bitcoin. A sale. Best regard. Carl ‘Mark’ Force.”

On May 7, 2013, Force allegedly attempted to become the representative of Mt. Gox in North America. His email said: “I saw the news yesterday that you won’t be partnering with Coinlab. Sorry to hear that. If you are still looking for a U.S. and Canada representative, please keep me in mind. Thank you very much,” and the email was signed “Carl Force.”

In mid-May 2013, the DEA seized $5 million worth of Mt. Gox accounts in North America, without giving any explanation to the company.

On May 14, 2013, U.S. time, Force wrote to Karpeles, saying: “told you should have partnered with me!”—as if to make him regret not considering his offer.

The court documents also allege that former Secret Service employee Bridges played a major role in the seizure of the Mt. Gox accounts. Bridges used a Mt. Gox account to send $800,000 worth of bitcoin to accounts he controlled during the Silk Road investigation. He allegedly wired the funds to a personal investment account through nine transfers from March 6, 2013, to May 7, 2013. The final transfer was made two days before he was part of the affiant in support of a seizure warrant for Mt. Gox's accounts, court papers say.

Even the most amateur sleuth would probably see this as an attempt by Bridges to cover his tracks. With the U.S. accounts under the control of the investigators, it is believed that Bridges hoped to erase records of his transactions using Mt. Gox. Whether this was done in consultation with Force is not known yet.

Mark Karpeles told The Daily Beast in an email: “The fact that information provided by our lawyers to law enforcement ended up being known by parties being investigated at an early time (ie. before arrest) is a very big issue, as this could have brought all sorts of repercussions against Mt. Gox (or might already have, considering the current situation) and its staff, especially since Mt. Gox was not especially popular with people around Silk Road. We blocked some Silk Road vendors as far back as 2011. This could also lead many parties who might hold relevant information that should be shared with law enforcement to not do so fearing for their business and/or their life.”

The latest revelations even open the possibility that the rogue agents involved in the investigation may have played a peripheral part in the collapse of Mt. Gox, as well, by letting Ulbricht know that Karpeles was cooperating with the authorities. According to the affidavit, Ulbricht had zero tolerance for interference with his business and was vengeful enough to have allegedly paid the equivalent of $80,000 to Force to arrange the murder of a person Ulbricht believed had betrayed Silk Road and was working with the authorities—to ensure they could not be a potential witness.

A cybersecurity consultant working with the Tokyo Metropolitan Police Department said, “In light of the evidence that federal agents made the Silk Road operators aware of cooperation with the investigation by Mt. Gox staff—we will have to consider the possibility that the bitcoin theft at Mt. Gox was an act of retaliation, possibly with help from an insider.”