Technology pioneer John McAfee has been charged with conspiracy to commit fraud and money laundering in a deceptive scheme to promote cryptocurrencies, federal prosecutors announced Friday.

In a newly unsealed indictment, the Justice Department alleged that McAfee and his business associate Jimmy Watson used McAfee’s Twitter account to tout various cryptocurrencies to hundreds of thousands of followers, all while concealing from potential investors how they stood to gain from a run-up in prices. Prosecutors alleged that McAfee, Watson and other members of McAfee’s cryptocurrency team took in more than $13 million by victimizing investors who had bought into a fraudulent scheme.

McAfee was being detained in Spain after he was arrested on separate criminal tax-evasion charges filed by the Justice Department’s tax division. Department officials have said that his extradition to the United States is pending. McAfee and Watson could not immediately be reached for comment Friday.

Prosecutors allege that McAfee and his associates exploited the popularity of his Twitter account to run what is known as a “pump and dump” scheme.

McAfee and Watson first bought large quantities of cryptocurrencies at low prices, according to the indictment. Then, they promoted those same digital tokens on Twitter, in an attempt to inflate their prices, using false and misleading endorsements — including deceptively telling potential investors that they would disclose whether they owned the cryptocurrencies that they were recommending. But these were false assurances, prosecutors claim — next came the “dump.”

After the prices of the cryptocurrencies swelled, McAfee and his associates sold off their holdings, often at significant profit, according to the indictment, leaving investors with assets whose long-term value had substantially declined. Prosecutors allege that McAfee and Watson engaged in this “scalping” scheme from about December 2017 to about January 2018.

Prosecutors have also charged McAfee and Watson with crimes related to a second alleged scheme involving fundraising events called “initial coin offerings,” in which start-ups issue and sell digital tokens to investors. The Securities and Exchange Commission has warned that people who promote ICOs must disclose any compensation they receive for endorsing the digital tokens. In alleged violation of securities laws, McAfee and Watson endorsed ICOs while concealing from investors that they were in fact getting paid for promotional tweets.

From about December 2017 to February 2018, McAfee and his associates earned roughly $11 million in undisclosed payments from ICO issuers that they hid from the investing public, according to the indictment. Prosecutors included images of McAfee’s tweets in court documents as evidence of his misrepresentations. In one tweet dated Dec. 20, 2017, McAfee responds to another user who asks whether he gets paid to promote an ICO. “I do not,” McAfee says. But prosecutors allege he was in fact receiving compensation for boosting the ICO through his Twitter account.

All told, McAfee and Watson were charged with seven counts, each of which carries a maximum of 10 or 20 years in prison, in addition to potential financial penalties.

McAfee and Watson also face separate civil charges brought by the SEC and the Commodity Futures Trading Commission.

The indictment comes amid an extraordinary run-up in cryptocurrency prices. Bitcoin, the largest cryptocurrency by market value, surpassed $50,000 for the first time last month before pulling back. Digital tokens sparked a trading frenzy in late 2017 as bitcoin and other cryptocurrencies captured widespread attention and pushed further into the financial mainstream. Bitcoin has surged more than 60 percent this year.