Pharma felon Martin Shkreli got a hard dose of reality Friday when a Brooklyn judge slapped him with seven years behind bars for securities fraud.

Brooklyn federal Judge Kiyo Matsumoto handed down the sentence to the ever-arrogant 34-year-old after he broke down in tears while making one last plea for leniency.

“I was never motivated by money. I was trying to grow my stature and reputation,” he blubbered before a packed courtroom, as a clerk passed him a box of tissues. “The only person to blame for me being here today is me.”

“There is no conspiracy to take down Martin Shkreli,” he added. “I took down Martin Shkreli with my disgraceful and shameful actions. This is my fault. I’m not a victim here, I am the defendant.”

In addition to his prison sentence, Shkreli must undergo mental health treatment and perform community service. Matsumoto also imposed a $75,000 fine on top of a forfeiture order she signed earlier this week allowing feds to go after $7.3 million in assets.

Shkreli showed little emotion when the sentence was announced as 84 months, prompting him to turn to a notepad and do the math.

He gave his father and another relative, who were seated in the front row of the gallery, the OK symbol with his hand before being led out of the courtroom.

A jury returned a mixed verdict against the notorious felon last August, convicting him of defrauding investors in a series of his hedge funds, MSMB Capital and MSMB Healthcare.

The government claimed he’d also looted his drug company Retrophin to pay back the investors after he lost their money in a bad trade. He was acquitted of that allegation.

In deciding the sentence, Matsumoto pored over dozens of letters from Shkreli’s supporters and recounted his “lonely” childhood and abusive parents.

“I do believe he is genuinely remorseful for the betrayal of the trust of investors,” she said. “Although he is convicted of fraud, I do believe he is truly a kind and generous person.”

But ultimately, Matsumoto decided that his conviction was the result of an “egregious multitude of lies.”

“This is a serious crime. I do feel that time is necessary to protect the public,” she said.

Shkreli’s lawyers asked for a more lenient sentence of 12 to 18 months with community service — insisting that the failed pharmaceutical exec was remorseful and a changed man.

Shkreli’s lawyer, Ben Brafman, implored the judge for nearly an hour not to sentence the loudmouth “simply for being Martin Shkreli.”

“There are times when I want to hug him and hold him and comfort him,” Brafman admitted, “and there are times I want to punch him in the face.”

Prosecutors wanted at least 15 years, which the defense blasted as “draconian.”

“What motivates Martin Shkreli is his own image. He wants everyone to believe that he is a genius, a whiz kid, a self-taught biotech wonder, the richest man in New York. That image is his mansion, his Maserati. He needs to be mythical,” said prosecutor Jacquelyn Kasulis.

She cited a psychiatrist’s report that found Shkreli “cannot tolerate failure and instead will lie and rationalize his failures to perpetuate his self-image.”

In his address to the court, Shkreli called the report a “stunning revelation to me.”

He blasted prosecutors for “mischaracterizing” him in court as a greedy, self-absorbed manipulator.

“I don’t think the government knows the real me,” Shkreli told the judge. “I don’t think the real me is a collage of voyeuristic and Orwellian snippets.”

Following his conviction on three of eight counts, Shkreli boasted about dodging jail — or, at the very worst, being sentenced to a cushy, minimum-security federal prison camp he called “Club Fed.”

“I’d say there’s a good chance there’s no jail at all,” he told his followers last year on a livestream.

Shkreli has been cooling his heels at Brooklyn Metropolitan Detention Center as Inmate No. 87850-053 since September after the judge revoked his bail for offering a $5,000 bounty for a strand of Hillary Clinton’s hair.

He’ll get credit for time served toward his overall sentence.

The defense plans to appeal Shkreli’s conviction.

“Martin’s fine, he will be fine. It could be a lot worse,” Brafman told a gaggle of reporters outside the courthouse. “I am disappointed. It’s always hard when someone like Martin Shkreli goes to jail.”

Shkreli became known as “the most hated man in America” for jacking up the price of potentially life-saving drug Daraprim by 5,000 percent — and boasting about it.

Additional reporting by Lia Eustachewich