
    Old Salem Development Group, Ltd., et al., Respondents, v Town of Fishkill, Appellant.
    [754 NYS2d 333]
   —In an action, inter alia, to recover damages for unjust enrichment, the defendant appeals from so much of an order of the Supreme Court, Dutchess County (Beisner, J.), dated October 10, 2001, as denied that branch of its motion pursuant to CPLR 3211 (a) (7) which was to dismiss the third cause of action to recover damages for unjust enrichment.

Ordered that the order is affirmed insofar as appealed from, with costs.

The Supreme Court properly denied that branch of the defendant’s motion pursuant to CPLR 3211 (a) (7) which was to dismiss the third cause of action to recover damages for unjust enrichment. On a motion to dismiss pursuant to CPLR 3211, the court must “accept the facts as alleged in the complaint as true, accord plaintiffs the benefit of every possible favorable inference, and determine only whether the facts as alleged fit into any cognizable legal theory” (Leon v Martinez, 84 NY2d 83, 87-88; Collins v Telcoa Intl. Corp., 283 AD2d 128, 131). The defendant contends that because the dispute between the parties is governed by two contracts, the plaintiffs are precluded from asserting a cause of action to recover damages for unjust enrichment. Although the existence of a valid and enforceable contract governing a particular subject matter generally precludes recovery in quasi contract (see Clark-Fitzpatrick, Inc. v Long Is. R.R. Co., 70 NY2d 382, 388; Julien J. Studley, Inc. v New York News, 70 NY2d 628, 629), where there is a bona fide dispute as to the existence of a contract or the application of a contract to the dispute in issue, a plaintiff may proceed upon a theory of quasi contract as well as breach of contract (see Parkash v Utilisave Corp., 295 AD2d 330; Sforza v Health Ins. Plan of Greater N.Y., 210 AD2d 214, 215).

Here, while the parties do not dispute the existence of two agreements entered into between the plaintiffs and a nonparty which ultimately may govern the dispute herein, there is a dispute as to whether the defendant assumed the nonparty’s obligations to the plaintiffs under these agreements and therefore, as to whether the agreements govern the parties’ dispute. Under these circumstances, and at this early juncture in the litigation, the plaintiffs are entitled to proceed on both quasi contract and breach of contract theories. Krausman, J.P., Friedmann, Mastro and Rivera, JJ., concur.  