NEW YORK (AP) — A law professor who helped distribute a $1.25 billion settlement to Holocaust survivors will get $3.1 million in legal fees, a judge has ruled after years of wrangling.

Burt Neuborne, a professor at New York University Law School, and other attorneys sued Credit Suisse, UBS AG and other Swiss banks in the 1990s on behalf of the survivors, accusing them of looting millions of dollars of Jewish assets. The lawyers worked for free.

The judge asked Neuborne if he would remain on the case after the settlement was reached to help distribute the money. He agreed, but for a fee.

A group of about 20 survivors objected to his application for $5.7 million in legal fees after the distribution was concluded, saying they believed he had agreed to do the work for free.

Last spring, the dispute came before a federal magistrate, who recommended that Neuborne receive $3.1 million. U.S. District Court Judge Frederic Block approved that settlement on Thursday in Brooklyn federal court.

Neuborne said he was pleased with the ruling, noting that just a small group of the plaintiffs had objected to the fee.