The Delaware Court of Chancery on Monday ruled that Interbake Foods could not rely on its “material adverse change” argument to escape a contract to market cookies for Mrs. Fields Brands Inc. at grocery and convenience stores.

The five-year licensing agreement obligated Interbake, which makes Girl Scout cookies and other food for retailers like Wal-Mart Stores Inc., to sell Mrs. Fields' chocolate chip cookies through the end of the year.

But after a failed bid to buy the Colorado-based company in 2016, Interbake tried to accelerate its exit from the deal, arguing in court documents that Mrs. Fields knew when it entered the contract that the quality of its cookies had declined to the point that Interbake would not be able to meet its sales targets.