It has taken nearly seven years but the U.S. government is finally dipping into some of the billions it recovered from the Bernard Madoff fraud and will begin paying out $772.5 million to more than 24,000 investors worldwide, officials said Thursday.

The money, recovered since 2010 through a series of settlements by the federal victims fund, will go to reimburse the so-called indirect investors, those Madoff customers who invested in hedge funds, or “feeder funds,” not directly with Madoff.

“We have recovered billions of dollars from third parties — not Mr. Madoff — and are now returning that money to tens of thousands of investors,” Deputy Attorney General Rod J. Rosenstein said in a statement. “This is the largest restoration of forfeited funds in history.”

For years it was unclear if the indirect customers would see any recovery but the latest announcement indicated they could get back 25 cents on the dollar of their investments. At least 36,000 applied to the federal fund.

About 2,500 Madoff customers who invested directly with Madoff — who ran Wall Street’s largest Ponzi scheme — have already been reimbursed for their losses to a total of $10.15 billion from a separate recovery effort by trustee Irving Picard and the nonprofit Securities Investor Protection Corp. Customer recoveries from Picard’s efforts have amounted so far to more than 65 cents on the dollar, including some money from the protection corporation, and could hit 100 cents on the dollar in a few years, said one legal source said.

David Sheehan, counsel for Picard, said in a statement recently that reimbursing indirect investors was complicated by problems reconstructing records about what they gave the private feeder funds. Sheehan noted that some settlements reached by Picard with feeder funds required that their customers get some compensation.

Madoff’s fraud was uncovered in December 2008 when he was arrested on charges he ran a gigantic scheme that falsely inflated the value of customer earning from fictitious stock trades. While customer statements said they earned over $50 billion on investments of about $17 billion, in fact Madoff was paying off early investors with money from newer customers and never made stock trades. He is now serving a 150 year sentence in federal prison.

The federal Madoff victim fund is working with a total of more than $4 billion and, through various lawsuits and clawback actions, Picard has recovered nearly $14 billion so far. In December 2010, Picard and the federal government jointly announced that they had recovered about $7.2 billion from the estate of philanthropist Jeffrey Picower, a major Madoff investor. Of the Picower settlement, $5 billion was turned over to Picard and the remainder went to the federal victim fund.

In a separate announcement Thursday, acting U.S. Attorney Joon Kim and Picard said they had recovered more than $23 million in assets from the estates of Madoff’s sons Mark and Andrew, as well as from Mark’s widow Stephanie Mack. Those assets will be split between the federal victim fund and Picard’s customer fund, the officials said. Mark Madoff committed suicide in December 2010 and Andrew Madoff died in 2014.