Former pharmaceutical executive Martin Shkreli departs the U.S. District Court for the Eastern District of New York, August 3, 2017 in the Brooklyn borough of New York City.Former pharmaceutical executive Martin Shkreli departs the U.S. District Court for the Eastern District of New York, August 3, 2017 in the Brooklyn borough of New York City.

Shkreli was released from a federal prison in Pennsylvania on Wednesday and was placed in a halfway house in New York.

A friend of Shkreli's, who was one of the most prominent troll on the internet, posted a photo of them smiling in a car after his release, with the caption: Picked up this guy hitchhiking. He says he's famous.

His friend wore a t-shirt with a photo of Shkreli smirking and the words "Free Shkreli" underneath it.

Shkreli wrote on his Facebook page that it was easier to get out of a real prison than it was to get out of a fake one.

The Allenwood low-security federal correctional institution was to release Shkreli on Sept. 14.

Shkreli was sentenced to 7 years in prison. His release more than four years after his sentencing reflects the credit he received for good behavior in prison, and for completing education and rehabilitation programs while locked up.

It shows that Shkreli had already been in jail for six months before he was sentenced. Two months after his conviction, a federal judge revoked his release bond after he offered a $5,000 bounty for samples of Hillary Clinton's hair.

Benjamin Brafman said in a statement Wednesday that Martin Shkreli has been released from Allenwood prison and transferred to a BOP halfway house after completing all programs that allowed him.

While in the halfway house, I have encouraged Mr. Shkreli to make no further statement, nor will he or I have any additional comments at this time.

A Bureau of Prisons spokesman said Shkreli was transferred to community confinement.

The spokesman said in a statement that community confinement means either home confinement or a Residential Reentry Center. We don't discuss individual conditions of confinement for safety and security reasons.

The price of the life-saving drug Daraprim was raised by more than 4,000% overnight, making Shkreli a household name.

Shkreli earned the sobriquet "Pharma bro" for defending that price increase, for insulting people on social media, and for his purchase of a one-of-a-kind album.

The price increase of that anti-parasite medication is unrelated to his criminal conviction.

Shkreli was accused of defrauding investors at two hedge funds to found his first drug company, Retrophin. He was accused of covering up losses at his hedge funds to avoid paying back investors.

He was found guilty in the Brooklyn federal court of several charges.

In January, a federal judge banned Shkreli from the pharmaceutical industry and ordered him to pay nearly $25 million in civil penalties for engaging in anticompetitive conduct.

The Federal Trade Commission and seven other states were involved in the case.