The trustee seeking money for Bernard Madoff’s victims suffered a big defeat as a federal appeals court rejected his bid to recover nearly $30 billion from JPMorgan Chase & Co. and other banks he accused of aiding in the swindler’s fraud.

The 2nd U.S. Circuit Court of Appeals in New York said on Thursday trustee Irving Picard lacked standing to pursue a variety of claims on behalf of former Madoff customers.

It also said that because Picard “stands in the shoes” of the former Bernard L. Madoff Investment Securities LLC, he could not pursue other claims on behalf of the firm’s bankruptcy estate over a fraud that the firm itself orchestrated.

Thursday’s 3-0 decision, written by Chief Judge Dennis Jacobs, is a victory for JPMorgan, which had been Madoff’s main bank, as well as Britain’s HSBC Holdings Plc, Italy’s UniCredit SpA and Switzerland’s UBS AG.

Unless Picard successfully appeals, it also limits how much he will have to distribute to victims of Madoff’s Ponzi scheme once the recovery process is complete. That process began soon after Madoff’s Dec. 11, 2008 arrest, and may last years more.

“In dollars, it’s a significant defeat, and it’s a shame for defrauded victims because the purpose of a trustee is to recover funds for them,” said Kathy Bazoian Phelps, a partner at Diamond McCarthy in Los Angeles and co-author of: “The Ponzi Book: A Legal Resource for Unraveling Ponzi Schemes.”

According to his website, Picard has so far recovered $9.35 billion, slightly more than half of the $17.3 billion of customer principal he has said was lost.

Amanda Remus, a spokeswoman for Picard, said the trustee is reviewing the decision and is still pursuing more than $4 billion of separate claims against bank defendants in the federal bankruptcy court in Manhattan.

Picard is a partner at the law firm Baker & Hostetler.

Thursday’s decision upheld rulings by U.S. District Judges Colleen McMahon and Jed Rakoff in Manhattan, which the 2nd Circuit called “well-reasoned.”

Those rulings dismissed roughly $19 billion of claims against JPMorgan, $8.6 billion of claims against defendants including HSBC and UniCredit, and $2 billion of claims against UBS and many other defendants, the 2nd Circuit said.

Picard had argued that the banks ignored “red flags” of fraud, often to win more fees and commissions for services they provided to Madoff and his firm, and should pay their “fair share” to cover victims’ losses.

JPMorgan spokesman Joseph Evangelisti and UBS spokeswoman Karina Byrne said their respective banks are pleased with the decision. Marco Schnabl, a partner at Skadden, Arps, Slate, Meagher & Flom representing UniCredit, said he is also pleased with the decision. HSBC spokeswoman Juanita Gutierrez declined to comment.

Citing a legal doctrine known as “in pari delicto,” Jacobs said Picard could not assert claims on the firm’s behalf to recover for fraud caused by the firm itself.

He also said the federal Securities Investor Protection Act, which helps protect customers of failed brokerages, does not let Picard assert a variety of claims on their behalf.

The 2nd Circuit also set aside Picard’s contention that giving him greater power would reduce the chance of “windfalls” for Madoff’s enablers and increase recoveries for victims.

“No doubt, there are advantages to the course Picard wants to follow,” Jacobs wrote. “But equity has its limits; it may fill certain gaps in a statute, but it should not be used to enlarge substantive rights and powers.”

The judge added in a footnote that “it is not obvious why customers cannot bring their own suits” against the banks.

Phelps, the attorney and author, said there could be hurdles, including whether customers have legal standing to bring particular claims, or “can afford to litigate against large, well-funded banks.”

Picard has filed more than 1,000 lawsuits against banks and other defendants to recover more than $103 billion, a sum inflated by triple damages on some claims.

Madoff, 75, pleaded guilty in March 2009 and is serving a 150-year sentence in a North Carolina federal prison.

Prosecutors have estimated his Ponzi scheme was valued at $64.8 billion, reflecting amounts customers supposedly held at his firm prior to his arrest.

The cases are In re: Bernard L. Madoff Investment Securities LLC, 2nd U.S. Circuit Court of Appeals, Nos. 11-5044, 11-5051, 11-5175 and 11-5207.