The complaint avers that the plaintiff, in 1880, executed his bond and mortgage to one Parsons, payable January 1,1883; that in October, 1885, he sold the premises to defendant, who covenanted to pay the bond and mortgage as part consideration of the premises; that they have not paid the same; that said bond and mortgage are payable. Parsons is not a party to the action. The plaintiff demands specific performance of the covenant to pay the bond and mortgage or judgment against defendants for the amount; such amount, when collected, to be paid to the clerk of the court subject to the order of the court. The defendants demur (1) because the complaint does not state facts sufficient; (2) because Parsons is not made a party. The special term sustained, the demurrer, giving plaintiff leave to amend. The plaintiff appeals. The learned j ustice doubted whether Parsons was not a necessary party, but decided the demurrer on the insufficiency of the complaint. The granting of a specific performance has always been held to be discretionary; that is to say, the court will consider the special circumstances of the case in order to determine whether the plaintiff should have such relief, or should be remitted to his common-law remedy. Day v. Hunt, 112 N. Y. 191, 19 N. E. Rep. 414. For that reason it is especially important to understand all the circumstances of any case cited by plaintiff to sustain his position. There is an obiter remark of the chancellor in Warner v. Beardsley, 8 Wend. 199, which is often cited in subsequent cases. It was not necessary to the decision, and, whether right or wrong, it therefore decides nothing. In Marsh v. Pike, 1 Sandf. Ch. 211, affirmed 10 Paige, 595, the mortgagor applied to the grantees to pay off the amount of the mortgage, and they refused. He also applied to the mortgagee to permit a foreclosure in his name at the mortgagor’s expense, and the mortgagee refused. The court granted a decree against the grantees in favor of the plaintiff, the mortgagor, for the amount of the mortgage, the amount to be paid to the mortgagee. The assistant vice-chancellor had dismissed the bill against the mortgagee, from which dismissal there was no appeal. But the remarks of the chancellor imply that the dismissal was improper, according to his view, stated in Warner v. Beardsley, ut supra, and in Gibbs v. Mennard, 6 Paige, at 260, and according to the dictum in King v: Baldwin, 2 Johns. Ch. at 561. That is, these views of the chancellor, and the dictum cited, are to the effect that the surety may bring the principal debtor and the creditor into the court of equity to enforce the collection of the debt out of property primarily liable. So in Antrobus v. Davidson, 3 Mer. 579; Ritenour v. Mathews, 42 Ind. 7, 3 Pom. Eq. Jur. 1417, note. That doctrine, however, does not aid the plaintiff in this case, because he has not brought the creditor into the action. He relies on Farnham v. Mallory, *42 N. Y. 527, as an authority that it is not necessary to make the creditor a party. But that was a different case. In that case the *720vendor of land incumbered by a mortgage had agreed with the vendee to pay and discharge the same; and the defendant had guarantied that the grantor would do this. The court sustained an action on the guaranty by the grantee of the land to whom the guaranty had been given. In that case the land had not become the primary fund. The vendor had been paid the full price on his agreement to discharge the mortgage. Ho question of equity was involved. It was a simple action at law on the contract to recover the amount. It is settled, in a transaction like the present, that in equity the land becomes the primary fund, the grantee is treated as the principal, and the mortgagor as the surety. Comstock v. Drohan, 71 N. Y. 9. On that ground, and on special equities, have the cases rested in which, as above stated, the mortgagor has been allowed to bring creditor and grantee into court to enforce the lien on the land for his own protection. On that ground the case of Woodruff v. Railroad Co., 93 N. Y. 609, rested. The railroad was insolvent, and the property was in the hands of a receiver,.and it was eminently proper that the court should, by action or otherwise, direct its own officer to do equity and perform the contract. But it will readily be seen that it might sometimes be inequitable to compel the creditor to enforce his lien; as, for instance, when the security was insufficient, and when the creditor believed that the security would improve. In the present case the plaintiff seems to have intended to bring a bill for specific performance to compel the defendants to pay certain money. It is certainly unusual to ask specific performance of a contract to pay money. The remedy in such contracts is at law. And, if it be said by the plaintiff that the money is not to be paid to, him, and therefore an ordinary action on the covenant would not be proper, the answer is that, if the plaintiff has suffered damages, he may recover such damages; if not, the cause of action exists. The case of Slauson v. Watkins, 86 N. Y. 597, seems to be decisive of this case. The plaintiff had executed her bond and mortgage on the real estate. She contracted to sell it to defendant, who was to assume the mortgage, and pay the balance of the purchase price. And on the same day, at his request, she performed her part of the contract by conveying her part of the real estate to his wife, subject to the mortgage. The mortgagee began to foreclose. Pending the foreclosure, the plaintiff commenced an action to compel the defendant to pay, and the mortgagee to receive, the money due on the mortgage. The complaint was dismissed, and the dismissal was affirmed by the court of appeals. The only difference between that case and this is that the land had been conveyed to the wife of the person who had agreed to pay the mortgage; which is plainly immaterial, as it was conveyed subject to the mortgage, and was therefore the primary fund; and, secondly, that a foreclosure was pending. Of course, the pending of the foreclosiire might be an additional reason for the dismissal of the complaint. But the court goes beyond that, and states that no case is-cited whére a court of equity has interfered to compel the principal debtor to> pay a debt before it has been ascertained that the fund primarily liable was-insufficient. And this remark of the court may point out a distinction which, will reconcile some apparently conflicting principles. In Pomeroy, as above, quoted, it is said that the surety may sustain a quia timet suit in equity before payment. This is stated in Woolbridge v. Norris, L. R. 6 Eq. 410, on the authority of Lord Redesdale, who says: “A suit may file a bill to compel a debtor in a bond in which he has joined to pay the debt when due, whether the surety has been actually sued for it or not.” But in the present case the land has been made the primary fund, and the grantee may be called a surety to the land. Therefore it is equitable that the debt be enforced first against the land, before the purchaser is personally charged. The plaintiff’s action tends to reverse this equity, and to make the defendants pay the debt, which should be paid primarily out of the land. It cannot be sustained on the doctrine of quia timet, because there is property specifically pledged for the debt, *721which may be sufficient, and to which, at least, resort should first be had. How, the plaintiff in this case owes the debt. He borrowed the money of the mortgagee, and though in equity he is treated, since the conveyance to the defendants, as surety, and his land as the primary fund, still there is no hardship in requiring him to pay his bond, and then, by subrogation, to enforce the mortgage against the land, and to collect, on foreclosure, the deficiency from the defendants. The land should be made to pay the debt, if possible. We are not to be understood to say that there are no cases in which a surety may bring a suit in equity against the principal debtor and the creditor to enforce a lien on property pledged for the debt, or in which the surety may bring an action quia timet against the principal.. We think the present complaint cannot be sustained. Judgment affirmed, with costs, with leave to amend complaint in 20 days on payment of costs. All concur.