Order unanimously modified on the law and as modified affirmed without costs in accordance with the following Memorandum: Defendant owned approximately three acres of property in the Town of Amherst. Between 1988 and 1991, defendant negotiated with several potential purchasers, including Bob Evans Farms, Inc. (Bob Evans). On January 6, 1992, plaintiff real estate agency and defendant entered into an exclusive listing agreement (Agreement) for a six-month period. The Agreement provided that, if the property were sold during the life of the Agreement to certain enumerated parties, including Bob Evans, defendant would pay plaintiff a 4% commission. It further provided that, if the property were sold to anyone else during the life of the Agreement, a 5% commission would be due. In addition, the Agreement provided that, if defendant entered into a sales contract within three months of the expiration of the Agreement, "to anyone who inspected it during the term of the listing agreement, [defendant] further agree[s] to pay [plaintiff] at the same rate and terms of commission”. The Agreement expired and was renewed for another six months upon the same terms. The property was not sold during the life of the renewed Agreement but, within three months of its expiration, defendant entered into a contract to sell the property to Bob Evans. Plaintiff demanded a 4% commission on the sale, which defendant refused to pay, and this litigation ensued. Plaintiff moved for summary judgment on its complaint and defendant cross-moved to dismiss the complaint. Supreme Court denied the motion and cross motion, and defendant appeals.
The general rule of contract construction is that, "when parties set down their agreement in a clear, complete document, their writing should as a rule be enforced according to its terms” (W.W.W. Assocs. v Giancontieri, 77 NY2d 157, 162; see also, Namad v Salomon Inc., 74 NY2d 751, 753). Whether an agreement is clear and unambiguous is a question of law to be resolved by the court, based upon a reading of the contract as a whole to determine its purpose and intent (see, W.W.W. Assocs. v Giancontieri, supra, at 162; Matter of Wallace v 600 Partners Co., 205 AD2d 202, 205, affd 86 NY2d 543). If the language of the agreement is ambiguous, extrinsic evidence is *1080admissible to determine its meaning (cf., Namad v Salomon Inc., supra, at 753). In our view, the Agreement is ambiguous and extrinsic proof concerning the intention of the parties is required to interpret the term "inspected” in the three-month extension provision (cf., Ackerman v Dobbs, 181 AD2d 704, 705). Consequently, the court properly denied that part of the cross motion for summary judgment seeking dismissal of the breach of contract cause of action.
Plaintiffs quantum meruit cause of action, however, must be dismissed. This case falls within the general rule that a party cannot recover in quantum meruit where there is a valid and enforceable agreement that governs the transaction at issue (see, Clark-Fitzpatrick, Inc. v Long Is. R. R. Co., 70 NY2d 382, 388-389; Pritchard Servs. v First Winthrop Props., 173 AD2d 412, 413). (Appeals from Order of Supreme Court, Erie County, Sconiers, J.—Summary Judgment.) Present—Denman, P. J., Green, Fallon, Callahan and Doerr, JJ.