Former pharmaceutical executive Martin Shkreli, who was propelled to fame a few years ago for a massive price increase on a lifesaving drug for people with HIV and AIDS, was sentenced on Friday to seven years in prison for three securities fraud counts.

U.S. District Judge Kiyo Matsumoto of the Eastern District of New York handed down the sentence after a three-hour hearing in which lawyers, the judge and even Shkreli himself painted a complex picture of the disgraced executive and online provocateur who at one point earned the monikers “Pharma Bro” and “most hated man in America.”