The owners of the New York Mets and the trustee handling the massive Bernard Madoff fraud jointly announced an agreement Tuesday in which the owners get more time to pay off a $61 million debt, some of which was due Wednesday.

A group including Fred Wilpon and Saul Katz originally owed trustee Irving Picard a total of $162 million after settling an acrimonious legal battle in 2012. The settlement came after a $303 million lawsuit in which the trustee claimed that the team owners were willfully blind to Madoff‘s giant fraud when they reaped some fictitious profits. The Katz-Wilpon group have denied this.

Under the formula of the original settlement, the Katz-Wilpon group had the debt reduced by payments Picard has been making over the years to Madoff victims — including the Mets owners — in the Ponzi scheme. The group gets a credit because they were also owed over $178 million from losses in some its Madoff accounts.

It was expected under the original settlement that the debt would be paid off by June 1, 2017.

But even with the accelerating pace of the repayments to investors, there was still a shortfall that left the Mets group owing $61 million going into June 1. Part of the problem was that adverse court rulings deprived Picard of a potential recovery of $4.4 billion overall, an amount that could have been used to whittle down the team owners obligation even more, said a legal source.

advertisement | advertise on newsday

So far, Picard has recovered more than $11 billion lost in the $17.4 billion scam. Including payments from the non-profit Securities Investor Protection Corporation and a new distribution Picard is planning, investors with approved claims will have received $9.45 billion from his recoveries, according to recent bankruptcy court filings. Some had to be held back for pending legal claims and litigation.

Under the revised settlement announced Tuesday, the Katz-Wilpon group will only have to repay $16 million on June 1, instead of $23 million. The remainder, currently around $45 million, will be divided in four annual installments from 2017 to 2020.

The Katz-Wilpon group agreed in the new settlement to pay Picard 3.5 percent interest on the remaining balance. Saul Katz and Fred Wilpon have also now agreed to personally guarantee the balance, according to the statement.

In a statement, Picard said he believed the new arrangement was reasonable because it would add some additional value to the reservoir of funds he is using to pay back investors who lost out in the Madoff fraud.

Madoff pleaded guilty in 2009 to running Wall Street’s largest Ponzi scheme. He is currently serving a 150-year federal prison sentence.