Apple filed a billion-dollar lawsuit against Qualcomm in early 2017, but recently released documents suggest it spent years quietly undermining its partner and “creating evidence” to hurt it in court, Qualcomm lawyers told a court in San Diego. “They were plotting it for two years,” Qualcomm attorney Evan Chesler said of Apple’s strategy to undermine Qualcomm’s patent licensing program. “It was all planned in advance. Every bit of it.”

Reporters have been waiting to examine the internal Apple documents since the trial abruptly concluded on April 16, and highlights now available in Chesler’s slides (via Cnet) don’t paint a pretty picture. In September 2014, Apple internally discussed “future scenarios” for dealing with Qualcomm, including plans to “provoke a patent fight” with its partner “after the end of 2016,” and work with Intel in the meanwhile to “apply commercial pressure to Qualcomm.” The goal in so many words was to “hurt Qualcomm financially,” despite the fact that Apple relied heavily on the company’s technologies for its iPhones and cellular iPads.

In a more serious allegation, Chesler’s slides suggest that Apple commenced a plan to devalue Qualcomm’s patents while “creating evidence” to be used in the eventual lawsuit. The company allegedly licensed atypically cheap patents from other suppliers to compare against Qualcomm’s portfolio, which it would then outwardly present as comparable during licensing disputes, despite internally acknowledging the cheap patents as weak.

By contrast, the company internally regarded Qualcomm’s portfolio as the “strongest” in the industry, and was just looking to reduce its payments to its modem supplier — even though Qualcomm’s royalties, it said, remained nearly flat by comparison with growing iPhone sales. Apple seemingly compounded the situation by contractually requiring Qualcomm to keep supplying components even if Apple’s contract manufacturers stopped paying licensing fees, then told its manufacturers to cut off payments, reducing Qualcomm’s revenue stream.

While Qualcomm and Apple formally settled their legal disputes on April 16, and Apple is expecting to use Qualcomm parts in its first 5G iPhone next year, these documents suggest that Qualcomm shouldn’t sleep with both eyes closed for the foreseeable future. Though Apple’s key 5G partner Intel has dropped out of the 5G modem supply chain for smartphones, there’s little question that Apple is working on its own modem at this point, and it’s only a matter of time — perhaps six years or less — before it’s ready to make the switch. It remains to be seen whether those years pass uneventfully, or instead generate more legal drama.

We’ve reached out to Apple for comment on the allegations, and will update this article if we hear anything back.