Thanks to the largesse of the ex-husband of a former Real Housewives of New Jersey star, John Perna’s lavish wedding reception, attended by over 300 guests at a swank restaurant, cost him little or nothing, according to federal prosecutors.

To earn it, they said, all he had to do was to plan and execute an assault on the reality star’s current husband.

Thomas Manzo, 55, of Franklin Lakes — the setting of the Bravo series in which his ex-wife, Dina, appeared — was arrested and charged Tuesday with hiring Perna, 43, of Cedar Grove, to pull off the attack. Manzo is a member of the Lucchese crime family, prosecutors said, and Perna is a “made” member.

Both men, who appeared before Judge Cathy L. Walder in federal court in Newark wearing protective masks Tuesday afternoon, were charged with multiple racketeering and conspiracy counts. Attorneys for both entered not guilty pleas.

Walder set bail at $100,000 and ordered house arrest for Perna, although the judge said she would consider objections by his attorney, Stacy Biancamano, that Perna needed to leave the house to run his construction business, that his wife was furloughed, and that they had a young child.

According to the indictment, Manzo, co-owner of the Brownstone Restaurant in Paterson, hired Perna in July 2015 to carry out the assault on Dave Cantin, who at the time was Dina’s boyfriend.

Perna and an accomplice attacked Cantin at a strip mall, and Perna used a slapjack in the attack, according to the indictment.

For payment, Perna was able to hold his wedding reception, attended by about 330 guests, at Manzo’s restaurant for a fraction of the normal price, and the bill was paid by another member of the Lucchese family.

“The allegations resemble the fictional plot of the reality TV series,” Manzo’s attorney, Michael Critchley, said.

Manzo was charged with “falsifying and concealing records” for failing to turn over documents during the investigation of the assault, they said. The FBI eventually executed a search warrant and seized invoices for Perna’s reception.

The maximum sentences that each man could receive on all the counts, including an unrelated insurance-fraud charge against Perna, would be 43 years in prison and $500,000 in fines.

The indictment stated that Cantin suffered “serious bodily injury” and a “permanent facial scar,” although it didn’t say whether he required hospitalization. Cantin also was a victim of a home invasion and assault in 2017.