Pharma Bro Martin Shkreli has been jailed because a judge believes he is a danger to society.

The convicted fraudster had his bail revoked after posting on Facebook that he would pay $5,000 for a strand of Hillary Clinton's hair.

Shkreli, who was found guilty on two counts of securities fraud on August 4, caught the Secret Service's attention after he wrote a Facebook post last week that read: 'The Clinton Foundation is willing to KILL to protect its secrets. So on HRC's book tour, try to grab a hair from her... Will pay $5,000 per hair obtained.'

Pharma Bro Martin Shkreli (left) has been jailed because a judge believes he is a danger to society after the Secret Service launched an investigation against him for a post on Facebook that appeared to call for a bounty on Hillary Clinton (right)

Shkreli caught the Secret Service's attention after he wrote a Facebook post last week that read: 'The Clinton Foundation is willing to KILL to protect its secrets. So on HRC's book tour, try to grab a hair from her... Will pay $5,000 per hair obtained'

Prosecutors also cited several other Twitter and social media postings by Shkreli that they said were harassing to women. On August 31 he posted a picture of him holding a computer chip with the caption that reads: 'How about this chip? 10 million deleted HRC emails? Oh well'

It is just one of a series of controversial social media posts since he was convicted of fraud.

He will now stay behinds bars until his sentencing, where he faces 20 years in prison.

U.S. District Judge Kiyo Matsumoto in Brooklyn said the September 4 post, which prompted a call from the U.S. Secret Service, showed Shkreli posed a danger to the public that warranted revoking his $5 million bail.

U.S. prosecutors had moved to jail Shkreli last Thursday.

'Since his conviction on August 4, 2017, Shkreli has engaged in an escalating pattern of threats and harassment that warrant his detention pending sentencing,' prosecutors wrote in their motion to a Brooklyn, New York, federal judge in a filing Thursday.

'Most recently, Shkreli threatened former Secretary of State Hillary Clinton by publicly offering $5,000 to anyone who would "grab" some of her hair on the defendant's behalf during her upcoming book tour' prosecutors wrote.

Shkreli (seen left with his attorney, Benjamin Brafman, outside U.S. District Court for the Eastern District of New York on August 3) was convicted in August of defrauding investors of two hedge funds he ran, MSMB Capital and MSMB Healthcare

Shkreli (seen in the above August 15, 2017 file photo) became famous for raising the price of anti-infection drug Daraprim by 5,000 percent in 2015 while he was chief executive of Turing Pharmaceuticals

The threat required 'significant expenditure of resources by the US Secret Service,' prosecutors said, adding that there was risk that one of Shkreli's many social media followers would take his statements seriously.

Prosecutors also cited several other Twitter and social media postings by Shkreli that they said were harassing to women.

'However inappropriate some of Mr. Shkreli's postings may have been, we do not believe that he intended harm and do not believe that he poses a danger to the community,' Shkreli's lawyer, Benjamin Brafman, said in a statement.

Shkreli apologized for his actions on Monday.

In a letter addressed to Judge Matsumoto, Shkreli wrote that he 'used poor judgment' and 'never intended to cause alarm or promote any act of violence.'

'I wanted to personally apologize to this Court and my lawyers for the aggravation that my recent postings have caused,' Shkreli wrote.

'I understand now, that some may have read my comments about Mrs. Clinton as threatening, when that was never my intention when making those comments.'

Shkreli was convicted in August of defrauding investors of two hedge funds he ran, MSMB Capital and MSMB Healthcare.

He was acquitted of stealing from a drug company he later founded, Retrophin Inc, to pay them back.

Though he faces a maximum sentence of 20 years, Shkreli will likely serve much less, in part because none of his hedge fund investors lost money.

Shkreli became famous for raising the price of anti-infection drug Daraprim by 5,000 percent in 2015 while he was chief executive of Turing Pharmaceuticals.

Patients and U.S. lawmakers were outraged.

Since his December 2015 arrest, he has clashed frequently with critics on social media.

Twitter banned him from its platform in January for harassing a female journalist, another incident prosecutors cited in their motion to revoke his bail.