Under a pending agreement, a developer and two investors will get back most of their original $124 million investment to lease the World Trade Center just six weeks before a terrorist attack destroyed the twin towers.

Developer Larry Silverstein and investors Lloyd Goldman and Joseph Cayre are nearing a deal that would give them about $98 million back from that investment, The New York Times reported Saturday.

The deal also would allow Silverstein to retain control of rebuilding the office space at the site in lower Manhattan, the Times said.

It was the largest real estate deal in New York history when Silverstein and his partners paid the Port Authority of New York and New Jersey about $800 million in fees and down payments for a 99-year lease. They agreed to pay about $120 million in rent per year.

Most of WTC Down Payment to Be Returned

Of that $800 million, Silverstein put up about $14 million, Goldman and Cayre provided about $110 million, and about $127 million came from Westfield America, which operated the shopping mall at the trade center, the Times said. The GMAC Commercial Mortgage Corp. lent Silverstein $563 million.

Silverstein and the Port Authority have agreed to buy out Westfield America, the newspaper said. Silverstein will use insurance payments he has received to repay GMAC, which would then turn over $130 million in escrow and $98 million in reserve to Silverstein, the Times said.

The $130 million would be used for rebuilding and the $98 million would be returned to Silverstein and his investors, the Times said.

“We are very close to an agreement with all the parties,” Greg Trevor, a Port Authority spokesman, told the Times.

A spokesman for Silverstein declined to comment. GMAC issued a statement saying the deal is still subject to approval by Westfield and bondholders.