Inequitable conduct rulings in patent cases are rare. But when they do happen, they can be very costly for the losing party. For evidence, look no further than a ruling issued Monday that puts 3M Company on the hook for millions of dollars that rival TransWeb LLC spent on attorneys at Quinn Emanuel Urquhart & Sullivan—plus millions more for good measure.

In a ruling issued on Monday, U.S. District Judge Faith Hochberg in Newark ruled that two patents 3M asserted against TransWeb were obtained through inequitable conduct—i.e., a fraud on the patent office. A jury reached the same conclusion in 2012, but the verdict was only advisory because inequitable conduct is an issue for judges to decide.

Having determined that 3M improperly procured its patents, Hochberg turned to the related question of whether 3M should have to cover the costs TransWeb incurred defending itself against meritless patent infringement claims. Hochberg ultimately put 3M on the hook for $26.1 million—the amount proposed by a special master in the case. The special master came up with the $26.1 million figure by taking the bill Quinn Emanuel racked up representing TransWeb and then trebling the bulk of it.

3M had urged Hochberg to chop 20 percent off of Quinn Emanuel’s legal tab, arguing that the firm’s rates of up to $970 an hour were far above the norm for New Jersey. Hochberg rejected that argument in Monday’s ruling, writing that “because TransWeb’s existence hinged upon winning a complex patent litigation with novel and difficult substantive issues, a premier litigation firm was a reasonable choice.”

3M and TransWeb both manufacture filtration materials used in industrial respirators. 3M sued in TransWeb in 2010, alleging infringement of two patents on a method of producing its products. The patents were filed by 3M employees and prosecuted by an in-house 3M lawyer.

TransWeb maintained that it came up with 3M’s patented technology more than a year before 3M. 3M was well aware of this fact, TransWeb argued, because TransWeb’s founder shared samples of his product with 3M employees at a trade fair in 1997, a year before 3M filed its patent applications. On the basis of these allegations, TransWeb sought to invalidate 3M’s patents on grounds of obviousness and inequitable conduct. TransWeb also raised a so-called Walker Process claim, named after a U.S. Supreme Court case that held that the enforcement of a patent procured through fraud is an unlawful attempt to monopolize under the Sherman Act.

In November 2012, a jury returned their advisory verdict that 3M engaged in inequitable conduct. They also sided with TransWeb on its Sherman Act claim. According to an agreement by the parties, it was up to Hochberg and the special master (a former judge) to calculate damages.

TransWeb is represented by Harold Barza and Michael Williams of Quinn Emanuel. Williams declined to comment, except to say that Quinn Emanuel and TransWeb are pleased with the ruling and grateful to the judge and jury for their attention to a complex case.

3M is represented by Fish & Richardson and Axinn Veltrop & Harkrider.