NEW YORK — Martin Shkreli, accused of defrauding his hedge fund investors and a pharmaceutical company, was convicted on three of eight counts on Friday, after a five-week trial in U.S. District Court in Brooklyn, N.Y.

He faces up to 20 years in prison.

Even the mixed verdict was a shattering defeat for the divisive Shkreli, who said before the trial that he was “so innocent” that the judge, jury and prosecutors would apologize.

Shkreli was accused of securities and wire fraud related to two hedge funds he ran, MSMB Capital and MSMB Healthcare. Prosecutors charged that he then illegally used a pharmaceutical company he founded, Retrophin, to repay the defrauded MSMB investors.

LATEST BUSINESS VIDEOS

Neighbor Of Shooting Range Tied To Trump Family: 'It's Like You're In A War Zone'Buzz 60

This Is Why Most People Would Like to Be Their Own BossBuzz 60

What You Need to Know about Chip and Joanna Gaines' New Magnolia MarketELLEDecor

Tim Cook Promises Apple Will Make Big Moves in HealthcareWibbitz

Elderly Man Learns How to Use PhoneJukin Media

You Cannot Miss This Incredible Documentary of Manolo Blahnik on How He Built His Shoe EmpireELLE

Instagram Is Testing a New 'Regram' Feature – for StoriesWibbitz

Small Business Wednesday: Pink Daisy CompanyBrandpoint

Winter Olympics: Despite Protest, Dog Meat Still On the Menu in South KoreaVeuer

New World of Sailing - America's Cup: Bermuda 2017PopularMechanics

The prosecution brought forth an “avalanche” of evidence, as prosecutor Jacquelyn Kasulis put it in her rebuttal argument, that included a threatening letter he sent to the wife of a former employee, statements he sent to MSMB investors showing great returns at the same time he had no money in fund accounts, three versions of a backdated agreement to make it look as if MSMB Capital had invested in Retrophin when it had not, as well as claims about assets under management that were wildly out of line with his actual fund size.

Shkreli, known as “Pharma Bro,” made headlines after raising the price of a drug called Daraprim to $750 a pill from $13.50 overnight. The case against him, however, has nothing to do with the Daraprim pricing, and the federal investigation into Shkreli’s hedge fund and Retrophin work began well before that.