Former Hudson River Café owner Hamlet Peralta was sentenced to five years in prison Friday for running a Ponzi scheme that involved Jona Rechnitz, the real estate investor who has become a key government witness in multiple probes of political corruption in New York City.

Manhattan U.S. District Judge Katherine Forrest said she didn’t know why Peralta, 38, decided to shift focus from his successful restaurant to luring investors into a scheme to wholesale liquor, but it drew him into a “vortex” of deceit that raised $12 million and left $5 million in losses.

“The moral compass you had was not pointing north,” she said. “It was askew.”

The sentence followed a hearing focused in large part on Rechnitz, who was wiretapped in the Peralta case, became a key informant in a probe of Mayor Bill de Blasio, and is expected to be a star witness in upcoming corruption trials of former corrections union boss Norman Seabrook and of two former NYPD officials.

Defense lawyer Cesar deCastro told Forrest that Rechnitz charged an 18 percent commission over two months for finding investors, eventually put in $3 million of his own cash to cover investors he had recruited, and then used veiled threats that made Peralta fear for his life if he didn’t pay up.

Rechnitz even pressed for Peralta to get a life insurance policy to cover his debts, deCastro said, and became a driving force who made Peralta dig a deeper hole because Rechnitz wanted money to fuel the local corruption schemes that he has admitted in a conspiracy plea.

advertisement | advertise on newsday

“He needed cash to do everything else he was doing, which is all the related cases — peddling influence in local government and having the NYPD on speed dial,” deCastro said.

Prosecutor Kan Nawaday told Forrest that Rechnitz was irrelevant to Peralta’s sentencing, and that despite threats, high-interest rates and his role as a recruiter for the scheme he was like any other victim.

“He was duped by Mr. Peralta into believing this was a real investment vehicle,” Nawaday said.

Rechnitz allegedly used donations to the mayor to buy favors from City Hall, delivered bribes to Seabrook for investing union pension money into a hedge fund, and was part of a scheme to pay off ex-NYPD Dep. Chief Michael Harrington and Dep. Inspector James Grant in return for perks.

But he hasn’t been charged in Peralta’s case or for allegedly aiding a $70 million Ponzi scam involving ticket resales in which Jason Nissen of Roslyn was charged. After the sentencing, deCastro blasted prosecutors for including $100,000 for Rechnitz in a $5 million restitution order.

“We believe it is outrageous because restitution is a tool to compensate victims and should not permit Mr. Rechnitz to profit from his crimes,” deCastro said.

Acting Manhattan U.S. Attorney Joon Kim, in a release, didn’t even mention Rechnitz. “Peralta deceived investor after investor through bald lies,” he said in a statement.