An agreement was made between plaintiff and defendant C. P. Higgins for the purchase from plaintiff of a parcel of land *623at the price of $1,200; $300 to be paid in hand, and the payment of the balance to be secured by mortgage on the premises. At the request of C. P. Higgins, plaintiff executed a deed of the premises to A. J. Higgins, wife of C. P. Higgins, the latter of whom paid the $300 as agreed, and the wife executed promissory notes for the balance, and a mortgage of the lands to secure the payment of the same. The husband did not join in the execution of the notes or mortgage, but they were executed at his request and in pursuance of the agreement between himself and plaintiff. Both husband and wife took possession of the land, and have ever since occupied it. Subsequently the husband paid $108 interest on the debt; the balance not having been paid, plaintiff brings his action for a foreclosure. The defendant Meredith is a junior incumbrancer with full notice.
The defense is, that by the conveyance to the wife the property became the community property of the husband and wife; that under § 167' of the Civil Code, which provides that the community property is not liable for the contracts of the wife, the mortgage is void; that plaintiff might have had a vendor’s lien, but he waived it by taking the notes and mortgage, even though the mortgage be void; that this is not a case for a Court of Equity to give relief by holding the existence of an equitable mortgage, for the reason that there was no mistake of fact, but a mistake of law; and plaintiff, having by mistake of law taken what he supposed to be, but is not, a valid mortgage, he is now bound by that mistake, and must abide the consequences.
Admitting that the transaction did not create a mortgage in law, and not deciding but that plaintiff may have waived his lien of a vendor, we are of opinion that plaintiff has a lien upon the premises by way of equitable mortgage, to secure the unpaid portion of the purchase-money and interest. The husband, in bargaining for the premises, agreed that a mortgage should be given; a paper was executed in pursuance of that agreement, which was supposed by the parties to have accomplished that object. It now appears that that paper is invalid as a mortgage: equity will treat that as done which the parties , a greed to have done, and which ought to have been done. This *624Court decided, in Love v. S. N. L. W. & M. Co. 32 Cal. 639, that a mistake of law as well as of fact will" be considered, and the parties relieved from its consequences. Reference may also be made to Daggett v. Rankin, 31 Cal. 321, and Racouillat v. Sansevain, 32 Id. 389, where the doctrine of equitable mortgages is recognized and sustained.
Our view that this should be treated as an equitable mortgage is based upon the facts that the husband, in bargaining for the land, agreed that a mortgage should be given for the unpaid portion of the purchase-money; in pursuance of that agreement, the wife, at the request of the husband, executed a paper intended to be a mortgage, but which in law is not such; and that a Court of Equity will, under such circumstances, carry out the intention and agreement of the parties.
Plaintiff had judgment in the Court below for a sale of the premises in aid of the lien; defendant moved for a new trial, which was denied; defendants appealed. Judgment and order affirmed.
Morrison, C, J., and Thornton, J., concurred.