A federal judge has ordered Boston-based Thornton Law Firm and a New York firm to give back nearly $15 million they collected by dramatically inflating their bills.

Judge Mark L. Wolf concluded that Thornton, along with the Labaton Sucharow law firm, double-billed for some attorneys working on a class-action lawsuit involving State Street Bank, and billed for others that didn’t even work for them, boosting their overall legal charges by millions.

In addition, Wolf found that Thornton’s managing partner, Garrett Bradley, improperly listed his brother as an attorney on the case, running up a bill of more than $200,000 even though Michael Bradley played a limited role. Wolf credited the Globe Spotlight Team for uncovering the scheme.

The judge concluded the lawyers’ misconduct in the class-action case was so “egregious’’ he was required to send the decision to the state Board of Bar Overseers for possible disciplinary action.

“The United States has a proud history of honorable, trustworthy lawyers,’’ wrote Wolf in a 159-page ruling released Thursday night. “However, this case demonstrates that not all lawyers can be trusted when they are seeking millions of dollars in attorneys’ fees.’’

Thornton, a politically connected firm that has long been a leading donor to Democratic candidates, released a statement saying, “We are reviewing the opinion and will determine our next steps soon.’’

A statement from Labaton Sucharow said the firm is “extremely disappointed’’ in Wolf’s decision.

“We believe the Court has delivered a judgment that is neither consistent with the factual record in this case, nor our historical record,’’ said the statement.

Wolf named a special master to investigate whether the firms overcharged after a Globe Spotlight Team report in December 2016 about irregularities in the two firms’ bills.

The Globe reported that the firms claimed extraordinary fees for dozens of usually lower-paid lawyers who worked on the case, including Michael Bradley, who was listed as charging $500 an hour. At the time, he was often earning $53 an hour as a court-appointed attorney in Quincy, and he had little background in the subject matter of the lawsuit, which centered on international currency trades.

The Globe also found apparent double-counting of numerous lawyers’ hours in court filings intended to justify the fee request. The firms submitted bills for the same lawyers, often with different hourly rates.

The firms said double-billing of more than 9,300 hours was an inadvertent mistake.

In June 2018, the special master, retired federal judge Gerald Rosen, issued a scathing, 377-page report, accusing the firms of trying to “jack up’’ their billable hours and said they showed a “troubling disdain for candor and transparency that at times crossed the line to outright concealment of facts.’’

He recommended that Wolf reduce the fees paid in the class-action suit against State Street Bank to Thornton and Labaton by $8 million. Wolf went even further, cutting the overall $75 million in legal fees originally awarded to Thornton, Labaton, and several other firms to $60 million.

But Thornton and Labaton will take the entire $15 million hit because of their lawyers’ misconduct, Wolf ruled.

Wolf also ordered Thornton, Labaton, and a third firm, Lieff Cabraser, to pay for the special master’s investigation. The bill has already reached $4.85 million. Thornton and Labaton were ordered this week to pay the special master another $250,000 to implement Wolf’s decision. Each law firm has also had to pay for legal counsel to represent them in the investigation.

Wolf singled out Garrett Bradley, a former assistant majority leader in the Massachusetts House of Representatives, for the harshest criticism. Bradley resigned from the House in 2016. His resignation, Wolf surmised, was prompted by the Globe’s reporting.

Bradley, he said, filed a key court document to justify the firm’s fees that was “replete’’ with false and misleading statements.

The document included bills for lawyers who did not work for Thornton and whose work hours and billing rates were incorrect.

“Garrett Bradley’s quoted statements were untrue in virtually every respect,’’ Wolf wrote. “Garrett Bradley not only failed in his duty to make reasonable inquiry concerning whether the representations he was making were reliable, he made no inquiry at all.’’

Wolf also slammed Bradley for paying his brother $500 an hour in the case.

“His work involved only document review. He found a few possibly relevant documents. However, he produced no memoranda or made any other contribution to this case.’’ wrote Wolf, who ordered Michael Bradley’s hourly bill reduced to $250.

The judge said lawyers at both Thornton Law Firm and Labaton violated federal and state rules of conduct for lawyers.

Ted Frank, a critic of attorneys’ fees in class-action lawsuits who had offered to assist the court in this case, called Wolf’s decision important.

“We’re gratified that the court recognized the problems we identified and went beyond the special master’s proposal to return millions of dollars to class members,” said Frank, director of litigation at the Washington-based Hamilton Lincoln Law Institute. He expressed slight disappointment that the penalty to the two firms wasn’t harsher, “but maybe disciplinary bodies will start taking this seriously and there will be other consequences.’’

In the original case, plaintiffs accused State Street Bank and Trust of overcharging clients in foreign currency trades. The bank agreed to settle the case for $300 million, with $75 million going to the lawyers and the rest going to the plaintiffs.