Order, Supreme Court, New York County (Carol E. Huíf, J.), entered May 29, 1990, which denied defendant’s motion to dismiss the complaint as barred by documentary evidence, pursuant to CPLR 3211 (a) (1), unanimously reversed on the law and the complaint is dismissed, with costs. The Clerk is directed to enter judgment in favor of defendant-appellant dismissing the complaint, with costs.
Plaintiff commenced this action for a partition and division of real property located in Manhattan that he holds as a tenant in common with his sister, the defendant. If partition could not be had, plaintiff sought a sale of the property and distribution of the proceeds. An accounting was also sought.
Defendant, by way of a motion to dismiss, asserted the affirmative defense that by a written instrument dated October 2, 1967 the parties agreed that "[n]o sale of the building shall be permitted without the approval of both of us.” Therefore, defendant alleged plaintiff’s action for partition violated their agreement and could not be maintained.
The agreement further provided, inter alia, that the parties would share equally the expenses and profits of the building and that "[o]ur interests shall be as tenants in common, with our respective shares in the property devolving to our surviving heirs, subject to the conditions of this agreement.”
The IAS court found: (1) that the no-sale agreement was one not to seek partition; (2) that the agreement not to sell was not limited as to time; (3) that there was no express contingency which might terminate the agreement; and (4) that the agreement was not terminable upon the death of either party, but was binding on the parties and their surviving heirs. The IAS court concluded that the agreement was an attempt to prohibit partition for an indefinite period of time. As such, it was held that the agreement was an unreasonable restriction on the power of alienation and was, therefore, invalid and unenforceable.
We disagree. The parties freely entered into the agreement. The agreement provided that sale of the property, which would by necessity include partition, could only occur if both parties consented. If the express right to consent is construed as being personal to the parties, the agreement implicitly would terminate with the death of one party and permit the *288other to sell. (Herrington v Herrington, 81 AD2d 679 [1981], affd 56 NY2d 580 [1982]; Buschmann v McDermott, 154 App Div 515 [1913].) To the extent that the parties’ rights might be vested in their surviving heirs, sale or partition would be possible only if the heirs consented or died. Consequently, under any possible construction of the agreement, the power of alienation is not suspended for an indefinite period of time. Hence, the agreement is a binding and enforceable bar to plaintiff’s action for partition. (Herrington v Herrington, supra; Buschmann v McDermott, supra.) Accordingly, the complaint is dismissed. Concur—Murphy, P. J., Sullivan, Kassal and Smith, JJ.