Washington (CNN) The federal government became owners of one of the biggest troves of Bitcoin, thanks to seizing millions of dollars in the digital currency from criminals associated with the online black market Silk Road.

Two federal agents who helped lead one of several investigations in the case allegedly decided they wanted some of the money for themselves, according to a new federal court documents.

The two now-former agents from the Drug Enforcement Administration and the U.S. Secret Service are charged with wire fraud, money laundering and other offenses for allegedly stealing Bitcoin during the federal investigation of Silk Road, an underground illicit black market federal prosecutors shut down in 2013.

JUST WATCHED Police investigating incident at NSA Replay More Videos ... MUST WATCH Police investigating incident at NSA 02:53

The charges in a criminal complaint filed in San Francisco federal court paints a picture of corrupt federal agents trying to enrich themselves as they tried to bring down one of the Internet's top cybercriminals.

Read More