Former drug company CEO Martin Shkreli was remanded into custody on Wednesday after a judge revoked his bail over him offering a bounty for strands of Hillary Clinton's hair.

Shkreli, a convicted felon awaiting sentencing for securities fraud, said in a recent Facebook post that he would "pay $5,000 per hair" from Clinton during her book tour of What Happened.

He later deleted the post last week but federal prosecutors filed a court motion in New York requesting a judge to remove Shkreli's $5 million bond and put him behind bars for dangerous public conduct as a result of his comments on Facebook and that he posed a danger to the community.

In response, Shkreli posted on Facebook that he had been joking and addressed the prosecutors' request to put him in jail by saying "F--- the government!"

Shkreli then issued an apology for his controversial comments.

"I want to personally apologize to this Court and my lawyers for the aggravation that my recent postings have caused," Shkreli wrote in a letter to the judge overseeing his case, filed with the court Monday.

Shkreli was convicted in August of several counts of securities fraud and for lying to investors about his unsuccessful hedge fund. He was also convicted of conspiracy to commit securities fraud.

Previously, Shkreli was the CEO of Turing Pharmaceuticals and gained national attention for increasing the prices of Daraprim, a life-saving drug used by HIV patients, from $13.50 to $750 per pill.