Firefox’s default search engine has become the subject of a hotly contested legal battle, a few weeks after Mozilla announced it would be moving from Yahoo to Google. Yahoo’s new parent Oath filed a complaint against Mozilla in a California court on December 1, alleging a breach of contract. Now Mozilla has filed a counter complaint, stating that the switch back was in line with a deal struck between the two companies.

Sounds like a small thing, sure, but we’re talking hundreds of millions of dollars here. Back in 2014, Yahoo struck a deal that would make its search engine the default for Mozilla’s popular, if struggling, browser, to the tune of $375 million a year.

Details of the deal were only made public last year, as CEO Marissa Mayer’s time at the company came under the microscope while it prepared to sell itself to Verizon. For its many faults, the Verizon deal went through, of course, forming Oath in the process (the Yahoo/AOL hybrid under which TechCrunch resides). Along with it, Verizon inherited an annual payment of $375 million through 2019.

Not a bad deal for Mozilla, especially when one considers this little gem: Yahoo (or whoever owns Yahoo) is obligated to continue payments, even if Mozilla were to, say, drop the search engine as its default. Mozilla was given a contractual right to terminate the agreement, if Yahoo was found unacceptable for some reason.

That precise thing occurred just a few weeks back, as the company launched its new Quantum browser, switching back to Google in the process. The latest version of Firefox has been warmly regarded by many as a return to form for a company that had previously been lost in the woods, rapidly losing marketshare to Chrome in the process. Naturally, Oath/Yahoo want a piece of that action.

In yesterday’s counter-complaint, Mozilla explains that it took another long look at the deal post-Verizon acquisition and was no longer in love with its choice of Yahoo as the default engine.

“Immediately following Yahoo’s acquisition, we undertook a lengthy, multi-month process to seek assurances from Yahoo and its acquirers with respect to those factors,” the company explained in a blog post yesterday. “When it became clear that continuing to use Yahoo as our default search provider would have a negative impact on all of the above, we exercised our contractual right to terminate the agreement and entered into an agreement with another provider.”

Oath has not yet issued an official response to Mozilla’s official response.