Apple has just agreed to settle a long-running patent lawsuit for almost $25 million.

The lawsuit, filed by a company called Dynamic Advances, claimed that Apple had infringed on a patent involving "user interfaces that recognize natural language." The patent describes a method for "providing, through a user interface, a result of [a] search" using natural language queries of a number of connected databases.

The patent had been originally granted as far back as 2007 to the Rensselaer Polytechnic Institute in upstate New York. Rensselaer, an engineering-focused university, then licensed the patent to Dynamic Advances.

When Apple came out with Siri in 2011, Dynamic Advances sued the tech giant the following year, saying it had infringed on the patent. Rensselaer joined the suit in 2013, and this week Apple agreed to pay $24.9 million to settle the suit, according to the Albany Business Journal. The suit was expected to go to trial early next month.

About $5 million of the settlement will go to Dynamic Advances' parent company, a firm known as the Marathon Patent Group. Marathon has been labeled as a "non-practicing entity" or "patent troll" because it doesn't use the patents it holds to create products but rather makes its money from licensing patents and suing other companies for patent infringement.

Marathon pulled in some $19 million in revenue last year, according to its financial statements. Its subsidiaries have sued companies ranging from Yahoo to Pinterest.

Under the terms of the settlement, Apple will license Dynamic Advances' patent, which will insulate Apple from further lawsuits on that patent for three years. (At that point, presumably Apple would be offered the chance to renew the license or risk another suit.)

The high-profile case on Siri highlights the intellectual property minefield facing many tech companies, particularly wealthy ones who are a potentially lucrative target for opportunistic lawsuits. Some entrepreneurs have tried to address the issue by creating large networks connecting patent holders with inventors who may not realize there's already a patent that covers what they're working on. Others have simply adopted a strategy of patenting as many silly, random ideas as they can, just to deny non-practicing entities the opportunity to apply for broad or frivolous patents in hopes of cutting down on the number of abusive lawsuits.