OPINION OF THE COURT
Simons, J.In September, 1979 plaintiff, 805 Third Avenue Co., and defendant, M.W. Realty Associates,* two limited partnerships, entered into a contract for the sale by defendant of a portion of its air rights to plaintiff. In July, 1980 the parties modified the contract and in May, 1981 plaintiff instituted this action charging defendant with economic duress in compelling execution of the 1980 modification. It seeks to rescind the modified contract, to recover compensatory and punitive damages, and to obtain other related relief. After the action was commenced, plaintiff obtained preliminary injunctive relief from Special Term which maintained the status quo prior to trial. At the same time defendant moved to dismiss the complaint for failure to state a cause of action (CPLR 3211, subd [a], par 7). Special Term denied defendant’s cross motion. On appeal, the Appellate Division modified Special Term’s order by vacating the preliminary injunction and granting the cross motion to dismiss (87 AD2d 544). Plaintiff appeals from that order. It contends that its complaint states a cause of action, that in effect the Appellate Division has held that it must plead performance of conditions precedent in the September contract contrary to CPLR 3015 and that the Appellate Division has improperly dismissed the com*450plaint and granted judgment against it without prior notice (see CPLR 3015; Rovello v Orofino Realty Co., 40 NY2d 633). Defendant contends that the complaint must be judged by considering the terms of the 1979 contract annexed to it and that when that is done plaintiff’s complaint fails as a matter of law. We agree with defendant.
Briefly, it appears from the complaint that plaintiff is the ground lessee of the entire blockfront on Third Avenue between 49th and 50th Streets in New York City except for a two-story building on the northeast corner of 49th Street and Third Avenue which is owned by defendant. Plaintiff desired to construct an office building on the site and in order to increase to 31 stories the lawful floor area permitted under the city’s zoning laws, it agreed to purchase the air rights necessary for the additional stories from defendant for $1,900,000. The details of the purchase were set forth in a contract dated September 18, 1979. By its terms plaintiff agreed to deliver in escrow a cash down payment and a promissory note for the balance of the purchase price which was to be paid over eight years. In turn defendant agreed to deliver in escrow a declaration of zoning lot restrictions and a single lot and easement agreement which would complete the transfer of the air rights. The escrow deposits were to be exchanged on the “Sales Closing Date” set forth in the contract or earlier at plaintiff’s election. After the deliveries to the escrow agents were made, and relying on the agreement, plaintiff obtained from the city a permit authorizing it to commence construction of the building foundation only. It thereafter commenced excavation and construction and let contracts for erection of the superstructure. Plaintiff then alleges in its complaint that in May, 1980 it demanded that defendant deliver the documents “as required” by the contract of September 18,1979; that defendant refused to do so unless plaintiff agreed to a modification of the September contract on terms more favorable to defendant; that defendant’s refusal was “unconscionable” and “oppressive” and was done “maliciously” to apply economic duress to plaintiff because defendant knew that pursuant to the terms of the ground lease any delay in construction would cause serious and irreparable injury to plaintiff and its general partners; *451that compelled by such wrongful acts of defendant and the economic duress resulting from its wrongful refusal to deliver the documents, plaintiff executed the modified contract of 1980 to its damage and defendant’s benefit.
The theory on which plaintiff seeks recovery permits a complaining party to void a contract and recover damages when it establishes that it was compelled to agree to the contract terms because of a wrongful threat by the other party which precluded the exercise of its free will (Muller Constr. Co. v New York Tel. Co., 40 NY2d 955, 956; Austin Instrument v Loral Corp., 29 NY2d 124, 130; Oleet v Pennsylvania Exch. Bank, 285 App Div 411). The existence of economic duress is demonstrated by proof that one party to a contract has threatened to breach the agreement by withholding performance unless the other party agrees to some further demand (Austin Instrument v Loral Corp., supra). Thus, if all we had before us was plaintiff’s complaint we would reverse and deny defendant’s motion to dismiss, for accepting the allegations of the complaint as true, as we must, it alleges a cause of action upon which plaintiff may recover.
But that is not all there is before us. Plaintiff has annexed to its complaint the contract of September 18, 1979 and by doing so it has made the contract a part of its pleading for all purposes (CPLR 3014; see, also, Wernham v Moore, 77 AD2d 262). Interpretation of the contract is a legal matter for the court (West, Weir & Bartel v Carter Paint Co., 25 NY2d 535, 540; Bethlehem Steel Co. v Turner Constr. Co., 2 NY2d 456, 459), and its provisions establish the rights of the parties and prevail over conclusory allegations of the complaint (see Miglietta v Kennecott Copper Corp., 25 AD2d 57; Metcalfy Metcalf, 274 App Div 744; Siegel, Practice Commentaries, McKinney’s Cons Laws of NY, Book 7B, CPLR C3014:9, p 11; 3 Weinstein-Korn-Miller, NY Civ Prac, par 3014.14). Thus, we must determine defendant’s obligation from the contract and if it does not appear from the pleading as a whole that defendant has wrongfully withheld its promised performance, the complaint must be dismissed.
Under the terms of the contract of September, 1979 defendant’s declaration and lot agreement were to be deliv*452ered to plaintiff on the “Sales Closing Date”. Plaintiff was entitled to the document, however, only if plaintiff secured delivery to defendant of (a) the cash down payment and promissory note held in escrow, plus interest, (b) a letter of credit securing payment of the balance of the purchase price and (c) the architectural drawings filed with the authorities as proof that the final floor area did not exceed the area defendant agreed to convey.
Plaintiff does not contend, nor has it pleaded, that it did any of these things although the contract expressly provides that defendant’s delivery of the declaration and lot agreement is conditioned on plaintiff doing so. Rather, it contends that the “Sales Closing Date”, the time set for its performance in the contract, had not occurred, that its failure to perform was defensive matter to be pleaded by defendant and that its performance was excused because of defendant’s refusal to perform.
The contract defined the “Sales Closing Date” as “the date of issuance * * * by the Department of Buildings” of “a Building Permit for the Proposed Building.” Date of issuance, insofar as pertinent here, was defined as the earlier of the date on which plaintiff received authorization to begin or on which it actually did begin “excavation or any other construction activity (exclusive of demolition) for the Proposed Building” (emphasis added). Concededly, construction of the foundation started on December 4, 1979. Plaintiff pleads that it had started in its complaint. The dispute between the parties is whether the foundation work was the start of construction of the “Proposed Building” within the terms of the contract. Plaintiff contends that it was not because on December 4, 1979 it had not received final approval for the 31-story office building and therefore the only office building it could legally erect under the zoning ordinances could not exceed six stories. Obviously, plaintiff had no intention of building a six-story building, however; the construction undertaken was for erection of a 31-story building. Lease arrangements had been negotiated with prospective tenants to occupy such a building and construction contracts had been let to build it. As a matter of law, December 4, 1979 was the “Sales Closing Date”, the date that plaintiff began “excavation or *453any other construction activity * * * for the Proposed Building”, and' that was the date plaintiff was required to perform the preconditions for transfer of the air rights. Since it did not, it has not pleaded an actionable wrong by defendant and it cannot claim its nonperformance is excused or is defensive matter.
In short, the contract does not establish that defendant had an absolute duty to perform, as plaintiff claims. Since plaintiff was not entitled to performance, plaintiff has failed to state a cause of action for economic duress for a party cannot be guilty of economic duress for refusing to do that which it is not legally required to do. Defendant’s cross motion should be granted, therefore, because unlike those cases in which plaintiff’s pleading is sufficient on its face, .though his right to recover may be doubtful (see Rich v Lefkovits, 56 NY2d 276, 281), this action is controlled by the contract annexed to the complaint. There is no dispute about the facts, only a dispute of law concerning the interpretation of that instrument. Having resolved that dispute in defendant’s favor, we must affirm (see O’Hara v Del Bello, 47 NY2d 363, 368; see Guggenheimer v Ginzburg, 43 NY2d 268, 275, supra; Muller Constr. Co. v New York Tel. Co., 40 NY2d 955, supra).
Accordingly, the order of the Appellate Division should be affirmed.
Chief Judge Cooke and Judges Jasen, Jones, Wachtler, Fuchsberg and Meyer concur.
Order affirmed, with costs.
Defendant Citibank, N. A., is named as a party only because it issued a letter of credit for the benefit of defendant M.W. Realty Associates. It has not participated in this appeal.