It is well settled that this Court has power to decree the specific performance of a bond with a penalty. “Agreement to convey land maybe enforced in chancery,” remarks Parker, J., in Newton v. Swazey, 8 N. H., 12, “although it be secured by a penalty, and be contained in the condition of a bond.” The same .doctrine has been fully affirmed in Ensign v. Kellogg, 4 Pick. 1. In Dooley v. Wat*511son, 1 Gray, 414, Shaw, C. J., in delivering the opinion of the Court, says, “courts of equity have long since overruled the doctrine, that a bond for the payment of money, conditioned to be void on the conveyance of land, is to be treated as a mere agreement to pay money; when the penalty appears to be intended merely as security for the performance of the agreement, the principal object of the parties will be carried out.” “In applications for the specific performance of agreements,” says Catón, J., in Broadwell v. Broadwell, 1 Gilman, 599, “it is immaterial what the form of the instrument is, whether it be a covenant in a penal bond with a condition to do the thing. The great and leading inquiry is, what did the parties expect would be done ? what was the moving motive of the transaction ? what is the real substance of the agreement and primary object of the parties ? When that is ascertained, the Court will enforce its execution.” The form of the instrument by which the agreement of the parties is evidenced is wholly immaterial. “Thus, if a contract only appears in the. condition of a bond, secured by a penalty, the Court will act upon it as an agreement, and will not suffer the party to escape from a specific performance by offering to pay the penalty.” 2 Story’s Eq. § § 715, 750.
In contracts of this description, a trust is held to attach to the land, and to bind every subsequent vendee purchasing with notice of its existence. Linscott v. Buck, 33 Maine, 530.
When a trust is in writing, the law requires no particular form of words by which it is to be proved. The letters, notes, and memoranda, in writing, of the party to be charged, and his answers to a bill in equity, have been regarded as affording sufficient foundation for the action of the Court. Buck v. Swazey, 35 Maine, 41; Pratt v. Thornton, 28 Maine, 360.
The original purchase was made by the plaintiff and Paulk, on joint account, the first payment having been advanced by the latter. But “if a joint purchase is made in the name of one of the purchasers, and the other pays or secures his share of the purchase money, he will be entitled to his share as a resulting trust.” 2 Story’s Eq. § 1206. So when P. bought *512land, and took a deed in the name of EL-, and EL advanced the purchase money and took the notes of P. for the same, and agreed to convey the land to P. on being paid the money advanced, and interest, it was held that the money advanced by EL might be regarded as a loan to P., and the land, as purchased with the money of P., so as to raise a resulting trust. Page v. Page, 8 N. H., 187. If real estate is purchased for partnership purposes, and on partnership account, it is immaterial in the view of a court of equity in whose name the conveyance is taken, whether in the name of one partner or in that of all. In all these cases, let the legal title be vested in whom it may, it is in equity deemed partnership property, and the partners are deemed ceskii que trusts thereof. A purchaser of property thus situated, with notice of the trust, takes it cum onere like any other purchaser of a trust estate, and is bound by the trust. 2 Story’s Eq. § 1206.
Trusts are -either express or resulting by implication of law. The former must be proved by some written instrument, the latter need not be.
It is enacted by R. S., c. 91, § 11, that “there can be no trust concerning lands, except trusts arising or resulting by implication of law, unless created or declared by some writing signed by the party or his attorney.”
The agreement by which the trust is established, may be made before the purchase of the estate to which it attaches, as in Quackenbush v. Leonard, 9 Paige, 334, where three individuals entered- into a written agreement for the purchase of certain lots of land, the purchase money for which was advanced by one of the number to whom the conveyance of the same was made. It was there held, that the conveyance was in trust for those beneficially interested in the agreement, and that a court of equity would enforce and protect the rights of the several parties to the original agreement.
But it is entirely immaterial whether the trust is evidenced by a writing made before or after the purchase. The written declaration of a trust, parol in its origin, is as valid as if its creation had been by writing.
*513In the present case, the existence of the trust, and the price for which the property was purchased, and for whose benefit the purchase was made, arc abundantly declared in the bond or contract signed by Paulk, the specific performance of which is sought to be enforced by this bill. The condition of the bond is as follows : — “That whereas I have this day received from A. W. Babcock a deed of one-fourth part of seven undivided eighth parts of township number one, in the third range, west from the east line of the State, in the county of Aroostook, said seven-eighths being subject to a mortgage from said Babcock, this day given to John Huckins, and I have paid said Babcock for such conveyance, the sum of eleven hundred and seventy-three dollars: all which has been done by me for the equal benefit of myself and said Bragg. Now if said Bragg shall, repay to me one-half of said sum so paid by me, with interest from this time, then I am to convey to Mm one-half part of said undivided fourth part of said seven-eighths of said township, subject to the said mortgage, by good quitclaim and free from incumbrances under me, to convey as good a title as I have received.
“All the stumpage received on said seven-eighths part of said "township is to be appropriated to the payment of said mortgage; and after it is paid, to the payment of the money advanced by me as aforesaid, and interest so far as one-quarter part is concerned, and necessary expenses to be paid by me, and the remainder received for such fourth part to be equally divided between said Bragg or assigns and myself. As soon as I shall from said stumpage, or otherwise, receive as aforesaid the sum due to me from said Bragg for Ms one-half of said fourth part, then I am to make a conveyance thereof, as aforesaid, to him or assigns.”
The bill alleges, and the demurrer admits a performance by said Bragg, of all that was to be done and performed by him to entitle him to a conveyance.
Now there is no ambiguity in the language of the condition above recited. The joint interest of the parties in the original purchase, and that the obligor holds the estate for *514their joint and common benefit, are expressly declared. Language more clearly establishing the relation of trustee and cestui que trust can hardly be imagined. Here is a clear and manifest recognition in writing, of a previously existing trust, but of one which could mot have been enforced without such recognition, because its enforcement would be against the express words of the statute. Every fact necessary to create or establish a trust is precisely stated, the trust estate, for and on whose account, and when purchased, the purchase money of the same, and that it was advanced for the complainant, and that the land is held as security therefor, and the terms upon the performance of which the cestui que trust is to be entitled to a conveyance. All this is declared in writing, and, according to the entire weight of authority in England and in this country, establishes a trust.
In Dale v. Hamilton, 2 Phill. 266, (22 Eng. Ch. Cond. 266,) Hamilton and McAdam having purchased jointly certain real estate, at the instance of the plaintiff, by a memorandum signed by themselves, but to which the plaintiff was not a party, stated therein the purchase to have been made by them jointly, and that the plaintiff was to have one third of the profits arising therefrom, instead of commissions for purchasing, selling, surveying, or laying out the land into lots, but that he was to have no power or authority over the land, and that he should have no compensation till the whole was sold and paid for. The land having risen greatly in value, Hamilton and McAdam refused to recognize the interest of Dale in the speculation. Upon a bill filed by Dale, in which he sought for a sale of the land, and for the protection of his rights, Lord Cottenham: remarks as follows: “There is this distinction between agreements and declarations of trust: in the one, it is the agreement itself, which is the origin of the interest, that must be in writing; in case of a declaration of trust, which is only the acknowledgment of a pre-existing interest, it is the evidence and recognition, and not the origin of the transaction, that must be in writing. Here the declaration recognizes a past transaction, because *515the purchase had been agreed for before Hamilton became entitled to any share in it: and in this agreement between Hamilton and McAdam, they recognized. Dale’s right to have one-third of the profit to be produced by the sale of the land, after paying the expenses and interest on the purchase money. Now it would be the strangest thing in the world if, the statute being satisfied, which it is by finding this writing signed by the parties, the Court should not give relief to the party whom the document declares entitled to it. It is nothing that the plaintiff is no party to. this declaration of trust; that is not required. A declaration of trust may acknowledge a right in another party, if it is signed by the party declaring that he is the trustee of another.” So, “if upon an agreement for joint purchase, the conveyance is taken in the names of some but not all of the intended purchasers, the interests of the others may be established by any subsequent writing signed by the fiduciary partners, and which acknowledges or proves the existence of the trust; and this, although the agreement be that one purchaser shall find the money, and the other contribute his skill in purchasing and subsequently allotting and selling the land.” Dart, on Vendors and Purchasers, 435.
In New York, by statute, all trusts must be created or declared by deed or conveyance, in writing. This, it will be observed, is a material variation from our statute, which does not seem to require the creation or declaration of the trust to be by deed. In Wright v. Douglass, 3 Selden, 564, Tuggles, C. J., in delivering his opinion, says: — “The statute prescribes no particular form by which the trust is to be created or declared. Under our former statute in relation to this subject, it was only necessary that the trust should be manifested in writing; and therefore letters from the trustee, declaring the trust, were sufficient. Such is the law of England. Our present statute requires that the trust should be created or declared by deed or conveyance, in writing, subscribed by the party creating or declaring the trust. But it need not be done in the form of a grant. A declaration of a *516trust is not a grant. It may be contained in the reciting part of a conveyance. Such a recital in an indenture is a solemn declaration of the existence of the facts recited; and if the trustee and cestui que trust are parties to the conveyance, the trust is as well and effectually declared in that form as in any other.”
It is clear, therefore, that here is a written declaration of a trust, equally valid and binding, as though the parties had entered into an agreement before the purchase was made, as in Quackenbush v. Leonard, 9 Paige, 334. Indeed, where, as in the present case, money is advanced by one on account of another, and the deed taken to the person so advancing as security, it seems that the conveyance is held to be in trust for the person for whose benefit the purchase was made. “Should B. advance the purchase money, but only on account of A., then A. is the owner in equity, and B. stands in the light of a creditor.” Lewin on Trusts, 200.
The bond in and by which the trust between Paulk and Bragg is declared, was duly recorded before the conveyance of Paulk to the other defendants was made. “When such a trust is created or declared by an instrument in writing, the recording of it in the registry of the district where the land lies, shall be considered equal to actual notice thereof to all persons claiming under a conveyance, attachment or execution, made or levied after such recording. R. S., c. 91, § 33.
As the other defendants purchased after the bond was recorded, they come in subject to the equities between Paulk and ¡the plaintiff. 2 Story’s Eq. § 188.
Even if the bond were not to be regarded as an instrument to be recorded, still, according to the principles which govern courts of equity, the plaintiff would be entitled to a conveyance. That the plaintiff would be entitled, upon the facts set forth in the bill and admitted by the demurrer, to a decree for a conveyance from Paulk, is not to be questioned for a moment. The terms of the bond having been duly performed, the obligor is regarded in equity as the equitable owner *517of the land, and the vendor is deemed to stand seized for his benefit.
The conveyance to the defendants Boynton and Bradley and Winn, was by deed of quitclaim, and for their security. In Oliver v. Platt, 3 How. 333, the Supreme Court of the United States decided “that a purchaser by quitclaim, without any covenants of warranty, is not entitled to protection as a purchaser for a valuable consideration, without notice, and he only takes what the vendor could lawfully convey.” Adams v. Cuddy, 13 Pick. 460. A mortgage to secure prior indebtedness is not a purchase for a valuable consideration in equity. Dickerson v. Tillinghast, 4 Paige, 215. Still less can the other defendants, who hold the property as assignees, and in trust for such creditors as may become parties to the assignment, be hold entitled to protection. Their condition cannot be viewed in a more favorable light than that of their assignor, to whose rights only have they succeeded.
The defendants have paid no money upon the strength of their conveyance, they have parted with no property upon the faith of any apparent interest which Paulk has conveyed them. They received the property either in trust for creditors, or as indemnity against preexisting liabilities, and they have no equities which should entitle them to a preference over the plaintiff. Their deed gave them the “right, title and interest,” of their grantor, and they can only be regarded as purchasers, for a valuable consideration, of such “right, title and interest.” Bassett v. Norworthy, 2 White and Tudor’s Leading Cases in Equity, 65. Demurrer overruled.
Tenney, C. J., Rice, Hathaway and Goodenow, J. J., concurred.