It’s no secret that companies sometimes bring trade secrets cases to harm a competitor. But it’s rare for a trade secret defendant to find evidence of a plaintiff’s ulterior motives, as Schiff Hardin did recently in a fight between two plastic packaging companies.

A trade secrets complaint Portola Packaging brought against a rival backfired dramatically on Friday, when a Chicago state court judge sanctioned the company and awarded Schiff Hardin’s client, Logoplaste, its attorneys’ fees in the case (read the opinion here). Based on internal e-mails produced during discovery, the judge found that Portola brought the case to undercut Logoplaste’s expansion into Canada and then misrepresented its true agenda in court.

“Misrepresentations have permeated this litigation,” wrote Cook County circuit court judge Mary Anne Mason. “And Portola has elected to persist in relying on them, continuing to offer explanations that defy reason.” The decision appears to be the first ever to award attorneys fees under the fee-shifting provision of the Illinois Trade Secrets Act.

Logoplaste, a Portuguese company, approached Naperville, Ill.-based Portola in 2007 about buying its Canadian subsidiary. During the negotiations, Portola turned over information about its products and customer base. There’s evidence that Logoplaste agreed to keep the information confidential, but Portola never actually made Logoplaste sign a confidentiality agreement. The negotiations broke down in February 2008. A month later, Logoplaste won a contract with one of Portola’s major Canadian customers, the dairy supplier Saputo Inc.

More than a year later, Portola finally demanded the return of documents it handed over during the negotiations. It brought suit in May 2009, alleging that Logoplaste used confidential information in the documents to lure away Saputo, in violation of the Illinois Trade Secrets Act. Much Shelist filed the complaint for Portola. Kirkland & Ellis stepped in as lead counsel in September 2010, but bowed out of the case for unknown reasons in April.

Mason dismissed Portola’s trade secret theft claims on summary judgment in May 2011, on the grounds that the company failed to protect the confidential documents turned over during due diligence. The one-year time lag between the end of the negotiations and the filing of the complaint proved fatal. “Portola allowed sensitive and confidential information to remain in the hands of a known competitor,” judge Mason wrote. The remaining state law claims were dismissed in a separate summary judgement order in February 2012.

During fight over attorney fees that followed, Logoplaste’s lead lawyer, Schiff’s Matthew Prewitt (who brought the case with him from Greenberg Traurig last year) used e-mails by Portola’s general counsel, Kim Wehrenberg, to convince the judge that Portola acted in bad faith. Portola’s lawyers at Much Shelist and Kirkland, who were never accused of acting in bad faith, had argued that the e-mails were attorney-client privileged. Judge Mason disagreed, finding the privilege didn’t apply because Portola had designated Wehrenberg as a key fact witness.

With the internal Portola e-mails and memos in hand, Judge Mason tore into Wehrenberg in Friday’s ruling. Mason found that, in a crucial memo circulated just a few weeks before Portola filed its complaint, Wehrenberg urged his bosses to sue just to hurt Logoplaste’s business interests. The judge also found that Wehrenberg deliberately referred an unrelated matter to Logoplaste’s go-to Canadian law firm, Blake, Cassels & Graydon, for purposes of creating a conflict of interest that would block them from taking the case. “Not once did Portola executives express any concern over retrieval of Portola Canada’s confidential information,” the judge wrote. “Portola’s one and only goal was to interfere with Logoplaste’s relationship with Saputo.”

Mason also took Portola to task for alleging in its complaint that Logoplaste used information gleaned from confidential Portola documents to lure away a Portola employee. E-mails turned over during discovery showed that Wehrenberg knew before he filed the complaint that the Portola employee reached out to Logoplaste on his own, the judge ruled. “Portolo’s claim that Logoplaste was guilty of using Portola’s confidential information to ‘steal’ one of its employees was false and was known to Portola to be false at the time those representations were made to the court,” Mason wrote.

Based on those “misrepresentations” and others, Moss awarded Logoplaste attorney’s fees for the entire three-year duration of the case. The amount of those fees will be determined at a later hearing.

“The lesson for companies,” says Schiff Hardin’s Prewitt, “is that you can never take for granted that attorney-client privilege is going to hold.”

Counsel for Portola, Much Shelist partner Anthony Valiulis, told us the ruling ignored “objective evidence” that Logoplaste illegally used Portola’s confidential information, and that he likes his odds on appeal. In a motion opposing sanctions filed in February 2011, Valiulis wrote that “the idea that Portola would commence suit and then incur millions of dollars in fees and costs if it did not believe it could prevail and collect a judgement makes no sense.”

Along with Much Shelist, Kirkland & Ellis partner Brian Sieve represented Portola from September 2010 until he withdrew in April. Sieve declined to comment.

(A previous version of this story misspelled the name of the law firm Blake, Cassels & Graydon. We regret the error.)