As between the parties to the lease, a case is stated in the complaint which entitles the plaintiff to an accounting and for relief.
Upon the facts averred, it also appears that the plaintiff is entitled to reimbursement in some sum based upon the covenant contained in the agreement of 1864, changing the terms of the original lease for the cost of the new buildings above the sum of $60,000.
This being a suit in equity, if the defendant, the insurance company, is a proper and necessary party for any purpose, then the demurrer should have been overruled, for the reason that a good cause of action is stated against a defendant, if he is a necessary party for any purpose whatever, to enable the court to give full and complete relief on any question involved in the litigation.
As to parties defendant, the Code of Civil Procedure provides that any person may be made a defendant who has or claims an interest in the controversy adverse to the plaintiff, or who is a necessary party defendant for the complete determination or settlement of a question involved thei’ein. (Code, § 447.)
This rule, as to parties defendant, is substantially the same as the one which prevailed in equity actions when the Court of Chancery was a separate and distinct jurisdiction.
If the plaintiff is entitled to have the moneys which may be found due him, under the covenant relating to erecting new buildings, declared a lien upon the premises, then the insurance company was a proper party, whether such lien be prior or subsequent to the mortgage.
Our inquiry will, therefore, be limited to the question whether the plaintiff is entitled in equity to have the debt, which he alleges is due him, declared a lien, upon the property, and the premises sold, if that be necessary, 'for the payment of the same. There is no personal covenant on the part of the lessors to pay over .to the plaintiff the moneys to which he is entitled under the covenants *199contained, in the lease, for they have, in express terms, limited their covenant and made it binding upon themselves only in their representative capacity.
The only property or fund out of which the plaintiff can be indemnified, is the trust estate in the hands of the trustees, and it does not appear that there is any other property embraced within the terms of the trust than the premises covered by the lease.
In disposing of the question now presented, we must assume that the trustees, in making the ■ lease and entering into the covenants therein contained, acted within the limit of the powers conferred upon them by the instrument of their appointment. We, therefore, have before us a case where a party has a just debt against a. trust estate, arising out of improvements put upon the property which constitutes the trust, without any personal covenant or promise for the payment of the same, which can be enforced in a court of law, and his only remedy is limited to a proceeding against the trust estate.
It seems very clear that the plaintiff is entitled to have his debt, whatever the amount may be, paid out of the premises held in trust, and the same to be declared a lien thereon. And if it shall appear upon the trial that a sale is necessary to accelerate a payment, the court has power to decree a sale for that purpose.
All the essential elements necessary to constitute a lien in equity, as contradistinguished from those which arise by operation of law, or are based upon special agreement, exists upon the facts averred in the complaint. (Story’s Eq. Juris., §§ 1216, 1237.)
It is not necessary to consider and determine the question whether the lien which the plaintiff is entitled to is prior or subsequent to the defendant’s mortgage.
It is a familiar rule that a party who has a lien upon real estate and is seeking to enforce the same in a court of equity, may make all persons parties defendant who assert any claim to the premises, whether prior or subsequent, because the order of the respective liens is involved in the litigation and should be determined in the final decree. (Brown v. Volkening, 61 N. Y., 76.)
The order of the Special Term, sustaining the demurrer and dismissing the complaint,.should be reversed, and an order entered overruling the demurrer, with costs of the Special Term and of *200this appeal, and on payment of the same the defendant be at liberty to answer.
Brady, P. J., and Daniels, J., concurred.Order reversed; order entered overruling demurrer, with costs.