Financier J. Ezra Merkin, accused of secretly steering $2.4 billion in client funds to Ponzi schemer Bernard Madoff, is close to settling a lawsuit brought by the New York attorney general for about $400 million, according to a person close to the matter.

Merkin, a former chairman of the finance company GMAC LLC, betrayed investors by reaping $470 million in client fees while recklessly sending their funds to Madoff to oversee, the lawsuit contends.

Merkin is also in settlement discussions with Irving Picard, the trustee who has been trying to recover money for Madoff investors, said the source, who was not authorized to speak on the case publicly.

Merkin wants to settle the trustee case and the New York lawsuit at the same time, this person said.

Attorney Andrew Levander, who represents Merkin, did not immediately return calls for comment.

Danny Kanner, a spokesman for current New York Attorney General Eric Schneiderman, declined to comment. Amanda Remus, a spokeswoman for Picard, said the trustee does not comment or discuss settlement negotiations or ongoing litigation.

Merkin, also a philanthropist and art collector, ran the Ascot, Gabriel and Ariel funds. He resigned as nonexecutive chairman of GMAC, the financing arm of general motors, in the wake of the Madoff scandal. GMAC is now Ally Financial.

Former New York Attorney General Andrew Cuomo sued Merkin and his Gabriel Capital Corp in April 2009 in New York state Supreme Court, accusing him of self-dealing, reckless conduct and gross negligence. Merkin's clients included charities and nonprofit groups.

In May 2009, the trustee sued Merkin and his funds in U.S. Bankruptcy Court in Manhattan for $500 million in nonexistent principal they withdrew from the Madoff firm between 1995 and 2008.

Madoff pleaded guilty in March 2009 and is serving a 150-year prison sentence for the massive Ponzi scheme.

As of February 15, Picard has recovered or entered into agreements to recover more than $9 billion, more than half the $17.3 billion in principal estimated lost by Madoff firm customers who filed claims, according to the trustee's website.

The New York attorney general case is New York v. Merkin 450879/2009, New York state Supreme Court (Manhattan).

The trustee case is Irving H. Picard v J. Ezra Merkin, Gabriel Capital, L.P., Ariel Fund Ltd., Ascot Partners, L.P., Gabriel Capital Corporation 08-01789 in U.S. Bankruptcy Court for the Southern District of New York (Manhattan).

(Reporting by Karen Freifeld; Editing by Bernard Orr)