A federal judge ordered "pharma bro" Martin Shkreli to prison Wednesday after the disgraced former CEO offered $5,000 to anyone who could bring him a strand of Hillary Clinton's hair.

Shkreli had been out on a $5 million bond since being convicted last month of two counts of securities fraud and one count of conspiracy to commit securities fraud.

Judge Kiyo Matsumoto declared Shkreli a "danger to society" and ordered him to jail. Shkreli left the courtroom flanked by U.S. Marshals, but was not in handcuffs.

Sentencing on Shkreli's securities fraud conviction has been set for Jan. 16. He faces up to 20 years in prison.

Shkreli landed in hot water earlier this month when he made a series of posts suggesting he planned to clone Clinton, the former secretary of state and 2016 Democratic presidential nominee.

"On HRC’s book tour, try and grab a hair from her, Shkreli wrote on Facebook Sept. 4. "I must confirm the sequences I have. Will pay $5,000 per hair obtained from Hillary Clinton."

In a letter to Judge Matsumoto Thursday, Shkreli apologized for what he called an "awkward attempt at humor or satire" and insisted he was not threatening Clinton.

Shkreli's attorney, Ben Brafman, argued in court papers that Shkreli's comments were merely a tasteless joke comparable to some of President Donald Trump's derisive comments, not a threat worthy of putting him behind bars.

"Indeed, in the current political climate, dissent has unfortunately often taken the form of political satire, hyperbole, parody or sarcasm," Brafman wrote. "There is a difference, however, between comments that are intended to threaten or harass and comments — albeit offensive ones — that are intended as political satire or strained humor."

Click for more from the New York Post.

The Associated Press contributed to this report.