A federal judge has dismissed a legal malpractice lawsuit against six law firms in New Jersey and Texas accused of using invalid retainer agreements to charge excessive contingency fees for thousands of clients suing over transvaginal mesh devices.

The suit had alleged that Nagel Rice and the Potts Law Firm filed complaints in 2014 for Debbie Gore, a resident of Texas, and Doris Lance-Smith, an Alabama resident, despite not having retainer agreements that were valid under New Jersey law.

On Tuesday, U.S. District Judge Madeline Cox Arleo dismissed the case, brought last year in New Jersey's Bergen County Superior Court, after concluding that Texas law, not New Jersey law, applied to the case.

"Here, Texas has the most-significant relationship to all of plaintiffs' claims," she wrote. Gore's injuries occurred in Texas, and she retained a Texas firm with a retainer agreement under Texas law. Lance-Smith had similar Texas connections even though she alleged injuries in Alabama, which, in a footnote, the judge noted also has no cap on such contingency fees. Texas courts also administered the settlement of their mesh cases.

"While the court recognizes the strong public policy of New Jersey in protecting its citizens from bearing attorneys' fees in excess of its court rules, it declines to find, under the unique facts here, that New Jersey's interest in this litigation outweighs that of Texas," she wrote.

In a separate order, she closed the case.

Plaintiffs attorney Adam Slater, of Mazie Slater Katz & Freeman in Roseland, New Jersey, did not respond to a request for comment.

The defendants were: Nagel Rice, of Roseland, and firm partners Bruce Nagel, Andrew O'Connor and Robert Solomon; predecessors to Houston's Bailey Cowan Heckaman, and its founding member, K. Camp Bailey; Derek Potts and the Potts Law Firm in Houston; Houston-based Mesh Litigation Center, formed by the Bailey and Potts firms to "administratively process settlement claims from the mesh litigation"; Burnett Law Firm in Houston; Annie McAdams, a solo practitioner in Houston, and her former firm, Houston-based Steelman McAdams; and Junell & Associates in Houston.

"Our clients are pleased with the well-reasoned and thoughtful opinion but we have no further comment," wrote Thomas Quinn, of Wilson Elser Moskowitz Edelman & Dicker in Florham Park, New Jersey, for the Nagel Rice entities.

Stephen Orlofsky, a partner at Blank Rome's Princeton, New Jersey, office, who represented the Bailey and Potts defendants, declined to comment.

Mark Tallmadge, of Bressler Amery & Ross in Florham Park, New Jersey, the lawyer for the McAdams defendants, said he was pleased with the decision.

"New Jersey's connection to the disputes between the parties was limited at best and the court's conclusion that Texas law was controlling is well founded," he wrote in an email.

New Jersey law caps fees in products liability cases based on their settlement values, with the maximum at 33.3%, but the retainer agreements for Gore and Lance-Smith provided 40% contingency fees. The suit claims both firms filed about 1,450 similar suits against Ethicon and Bard in New Jersey state court.

Texas law, however, has no such cap on contingency fees, the judge wrote in Tuesday's order.

At the time of its filing, Nagel called the lawsuit "ridiculous" and alleged that it was brought in retaliation for a $40 million malpractice suit his firm filed against Mazie Slater, where his former partner, David Mazie, is a partner, a claim that Slater denied.

The suit also is the latest skirmish over attorney fees in transvaginal mesh devices, surgically implanted in women to treat pelvic organ prolapse and incontinence. Lawyers filed more than 100,000 lawsuits across the country over the devices, with verdicts reaching multimillion dollars, but many cases have settled.

Mazie Slater is one of four firms that unsuccessfully challenged an estimated $550 million in fees to attorneys who worked for the "common benefit" in the transvaginal mesh litigation. The fund comes from multidistrict litigation pending in the U.S. District Court for the Southern District of West Virginia.

Slater had accused lawyers tasked with doling out those fees of self-dealing and bill padding while limiting compensation to his firm, which filed the first case in the country against Ethicon in 2008 in New Jersey state court and, last year, obtained a $68 million verdict against Bard.

Potts, national managing partner of the Potts Law Firm, is on the executive committee leading the MDL, while Riley Burnett, of Burnett Law Firm in Houston, is on the MDL's fee and compensation committee.