By his amended bill the plaintiff alleged that as one of the heirs of Homer H. Southwick he had an interest in real estate in Malden which was subject to a mortgage given by his ancestor; that he was in possession and had expended large sums in repairs upon the premises and had paid the taxes, and interest upon the mortgage; that the premises were advertised for sale for breach of condition of the mortgage, and the defendant before the day fixed for the foreclosure sale represented that out of friendship for the plaintiff, he would bid in the property at the sale, advance the necessary money, take title, deed the property to the *356plaintiff and take in payment the plaintiff’s note secured by a mortgage on the property; that at the foreclosure sale, the defendant stated to those present at the sale that he was buying in the property for. the plaintiff and thereby induced the plaintiff and others to refrain from bidding at the sale, in especial one whom the mortgagee had asked to bid in the interest of the plaintiff; that the property was struck off to the defendant for $1,580, much less than its real value; that the defendant paid the price bid and took a deed; that in all he did the defendant was acting with intentional fraud to secure the real estate for himself at less than its value; that before the filing of the bill the defendant refused to make conveyance to the plaintiff upon the latter’s tender of a note and mortgage according to the agreement recited; and had bargained and sold the property for $4,200 to another. The prayers of the bill were that the court declare that the defendant held upon “a, resulting or constructive trust” for the plaintiff; decree a conveyance to the plaintiff upon performance by him of the agreement set out in the bill; and, pending the proceedings, restrain any conveyance by the defendant.
The defendant demurred on the grounds that the bill set out no cause for equitable relief; that it did not join necessary parties; that while it sought to enforce a contract for the sale of land it did not aver any contract or memorandum in writing to satisfy the statute of frauds; and that the facts set out did not in law create a trust in the property in favor of the plaintiff. This demurrer was sustained and a final decree dismissing the bill was entered thereon. The plaintiff appeals.
The demurrer was sustained rightly. The bill lacked necessary parties. The person to whom the property was alleged to have been bargained and sold was a necessary party, since the bill prayed a conveyance to the plaintiff. The apparent equity disclosed upon the allegations of the bill was to have the foreclosure sale set aside. The plaintiff’s co-owners of the equity of redemption, and the mortgagee, would be. necessary parties to a bill for such a purpose.
It is not good ground for demurrer that the bill did not *357aver that the agreements set out were in writing. Mullaly v. Holden, 123 Mass. 583. Cranston v. Smith, 6 R. I. 231. The defence of the statute of frauds, G. L. c. 259, § 1, and c. 203, § 1, is an affirmative defence ordinarily to be raised by plea or answer, Whiting v. Dyer, 21 R. I. 85; but if it appears that the agreements set out were in fact oral only, the court can consider this on demurrer. Ahrend v. Odiorne, 118 Mass. 261, 268. Dick v. Dick, 172 Ill. 578. The bill indicates that the agreements relied on were not in writing, and, upon this ground, the demurrer was properly to be sustained.
A fundamental difficulty with the bill, however, arises because the facts alleged in the bill as framed do not create either a resulting or a constructive trust. The bill as framed does not seek to set aside the foreclosure sale; and the court was justified in disregarding any equity to set aside the sale which it may disclose. It seeks a conveyance to the plaintiff either in performance of the agreements alleged, or by force of a resulting or of a constructive trust. The statute of frauds bars a specific performance. There was no resulting trust on the facts alleged. The plaintiff has paid nothing. He has not furnished the purchase money either in whole or in any part. The facts recited do not show a loan to him from the defendant. Kennerson v. Nash, 208 Mass. 393. The cases on which he relies, Jackson v. Stevens, 108 Mass. 94, Williams v. Carty, 205 Mass. 396, and Davis v. Downer, 210 Mass. 573, are distinguishable. Nor was there a constructive trust. Such a trust does not arise merely from a refusal to perform a promise, nor from a resort to the statute of frauds to defeat an obligation, which are the grounds relied upon in this bill. Bourke v. Callanan, 160 Mass. 195. Kennerson v. Nash, supra. Ciarlo v. Ciarlo, 244 Mass. 453. The expenditures of the plaintiff upon the premises and the payments of taxes and interest were all prior to the beginning of the foreclosure and in no way were induced by the action of the defendant.
The decree dismissing the bill was made after the. plaintiff had opportunity to amend and had amended. The orders and decrees are affirmed.
Ordered accordingly.