The financially struggling friend, Hudson River Cafe owner Hamlet Peralta, 37, worried that Rechnitz wanted to have him killed to collect on the money he owed him, sources said.

“I’m working day and night to produce and pay [Rechnitz] every dollar,” Peralta insisted to Rechnitz’s lawyer in an October 2014 ­e-mail. “Please calm Jona.

“I don’t want to get killed in the last hour.”

But a person with direct knowledge of Rechnitz’s insurance push insisted that the real-estate developer was merely making an educated bet that something might happen to Peralta because he owed so many people money.

“He was concerned Hamlet would get killed by somebody because he was caught up in a lot of bad stuff,” the source said. “If [Peralta] was going to get killed by somebody, then Jona is out a lot of money. He wanted to protect his interests.”

Rechnitz had invested roughly $3 million with Peralta in the form of short-term loans at the time, sources said.

Hamlet PeraltaWireImage

When the money was flowing, the two men had a great relationship and traveled together, including on a 2013 trip with former NYPD Chief of Department Philip Banks III and Rechnitz’s businessman pal, Jeremy Reichberg.

Banks’ relationship with Rechnitz has been eyed in the police pay-to-play scandal, and Reichberg already has been charged in the debacle.

Rechnitz and Peralta were so close that Rechnitz even bailed the restaurateur out of jail in May 2014 after he was arrested for punching a hedge-fund manager, a source said.

But by the end of 2014, Rechnitz was furiously e-mailing Peralta about his money and demanded that Peralta sign his name to paperwork for at least two life-insurance policies totaling $4.7 million, documents show.

It’s unclear whether Rechnitz succeeded in his efforts to buy $4.7 million in insurance on Peralta’s life.