This action is brought to foreclose a mortgage upon real estate, which mortgage was executed by the defendant, John E. Cooley, and delivered by him to the Security Trust Company ; and, upon its face, the mortgage purports to secure a promissory note for $500, dated December 20', 1893, which note was executed by said Cooley, and was by him delivered at the date of its -execution to the Security Trust Company. After a trial without a jury, the district court entered a money judgment against defendant Cooley *4for the amount claimed in the complaint; but it was'further adjudged by that court in substance, that the mortgage sought to be foreclosed by this action is invalid, and was at all times worthless as a security in the hands of the Security Trust Company, and the court below directed the plaintiff to cancel the same of record and surrender it to the defendant John E. Cooley. From such judgment, plaintiff appeals to this court, and demands a trial of certain issues of fact in this court, which are specified as follows: (1) Was the mortgage in suit executed, acknowledged and delivered by defendant Cooley?' (2) If so, was the same given to secure a part of the debt evidenced by the note sued on herein?. (3)If so, has said mortgage ever in any manner been released, discharged or otherwise rendered of no effect ?'
In this court the controlling question presented for determination is whether the mortgage is a valid security, and, as such, available to the plaintiff for purposes of foreclosure. The contention of the-defendant Cooley is fully set out in his answer' to the complaint as-follows:
“(2) Further answering, this defendant alleges that the said mortgage was given to the said Security Trust Company by'this defendant without any consideration whatever therefor, but simply as an accommodation to the said Security Trust Company, to enable it to sell, assign, transfer, negotiate, and hypothecate the note evidencing the indebtedness described in said mortgage to some person, or persons to this defendant unknown, and to enable the said trust company to make a true statement to such purchaser, transferee, or pledgee that the said note was secured by mortgage on real estate,, and to enable the said trust company to realize on said note by negotiating or hypothecating the same.
“(3) That at the time of the making and delivery of the said mortgage, it was understood and agreed by and between the said Security Trust Company and this defendant that the said mortgage should be, and was, given for the sole purpose as set forth in paragraph 2 of this third defense, and that the same should be, and was, accepted by the said trust company for the same purpose, and no other; that it was further stipulated and agreed by and between the said trust company and this defendant that the said mortgage was not given or received as security to the said trust company, but that the same was given and received, and was by the said parties understood and intended to be, as security only to the transferee or the pledgee of the said note; and it was further agreed that the-said *5mortgage should not be placed of record, but that the same should remain in the office of the said trust company until the said note should be returned to the said trust company, and that then the said mortgage should be delivered up to this defendant and canceled.
“(4) That the said mortgage has wholly fulfilled the purpose for which the same was made and accepted, that the said note evidencing the indebtedness purporting to be secured by said mortgage has been returned to the said trust company, and that the defendant, under the terms of the said agreement, is now entitled to have the same delivered up to him and canceled. Wherefore this defendant asks that the plaintiff’s cause of action be dismissed, and that he, the said defendant, do have judgment against the said plaintiff for his costs and disbursements herein.”
Upon the issues as specified in the statement of the case, the first -question of fact presented is whether defendant John E. Cooley executed the mortgage, and delivered the same to the Security Trust Company. As to this question of mere fact there is, and can be, no contention. It is conceded that subsequent to the delivery of the $500 note described in the mortgage, and on February 19, 1894, the defendant Cooley did execute and deliver the mortgage to the Security Trust Company and further, that after said company became insolvent, and-on July 27, 1897, said mortgage was recorded in the office of the register of deeds of Grand Forks county.
The second question of fact is whether the mortgage was given to secure a part of the debt evidenced by the note sued on. We are quite clear that an affirmative answer must also be given to this - question. It appears by the answer, as well as by the testimony, that in so far as the mortgage was intended to operate as security for the performance of any act whatever, it was given, and intended to be given to secure the $500 note described in the mortgage, which note, it appears, has never been paid; and the same has been merged in, and forms a part of, the note sued on in this action. Nor is such merger controverted in this courh If we understand the position taken by appellant’s counsel in this court, it is not that the mortgage was not, in any event, intended to be given as a security for the payment of . the $500 note described in the mortgage. On the contrary, the contention of counsel corresponds to the averments in the answer of the defendant Cooley in this respect, and both are to the effect that the mortgage was given, and intended to be given, to secure the debt evidenced by the note described in the mortgage; but it is *6further contended and alleged in behalf of John E.' Cooley, that he executed the mortgage as an accommodation to the mortgagee, and without consideration, and pursuant to an agreement in substance as follows: (1) That the mortgage was in no event to take effect or operate as a security in favor of the mortgagee; (2) that the same should take effect only in the event that the note described in the mortgage should be negotiated, transferred, or hypothecated by the mortgagee; (3) that, whenever and as soon as the note should be returned to the mortgagee, the mortgage should cease to operate as a security, and in that event the mortgagee should surrender the mortgage to said John E. Cooley; and that the mortgage should not be recorded, but kept in the vaults of the Security Trust Company. Upon these allegations of the answer, we have no difficulty in reaching the conclusion that the mortgage was intended to be given, conditionally, as a security for the payment “of a part of the debt evidenced by the note sued on herein.”
The third question presented is whether the mortgage has in any manner “been released, discharged, or otherwise rendered of no effect.” This, obviously, is the crucial question in the case. The mortgage was given voluntarily, and there is no claim that it was obtained either by mistake or fraud, and there can be no doubt that the note which it purports to secure is a substantial consideration for its execution. True, the mortgage was given two months after the execution of the note, but it is well settled that the same consideration which supports a principal debt will likewise support any collateral undertaking given to secure the payment of the principal debt. Nor is it at all necessary that the collateral undertaking should be given at the inception of the principal debt. See Red River Valley National Bank v. Barnes, 8 N. D. 432, 438, 439, 79 N. W. 880. The mortgage therefore rests upon a valuable consideration, and, unless the agreement pleaded in the answer can be upheld, the mortgage is and at all times has been a valid security in favor of the mortgagee for the debt which it purports to secure.
At the trial, evidence was received, against objection, which was offered by the defense in support of the collateral agreements alleged in the answer to the complaint. The evidence was offered for the purpose of defeating and setting aside a written instrument which is plain and unambiguous in its terms. The mortgáge, by its terms, purports to be a security in favor of the mortgagee named therein, and the evidence is offered to defeat the mortgage as security in the *7hands of the mortgagee, and to show that it never was given or intended as such security. It is our opinion that the evidence is not admissible, and that the case must be governed by an established rule of the common law, which has been recognized and clearly expressed in the Civil Code of this state. The common-law rule to which we refer was applied to a grant or deed of real estate by the Supreme Court of California in Mowry v. Heney, 86 Cal. 471, 25 Pac. 17. In that case a deed of real estate was delivered to the grantee by the grantor at a time when the grantor was ill and expected to die, and it was the grantor’s intent (known to the grantee), that the deed should not take effect if the grantor recovered from her illness. Upon these facts the court held that the deed took effect when delivered according to its written terms, and that its operation as a deed could not be defeated by parol evidence of the intent of the grantor in delivering the deed, or the conditions upon which the same was delivered. In its opinion (page 475, 86 Cal., page 19, 25 Pac.) the court quoted the following passage from Devlin on Deeds (section 314) with approval: “A deed cannot be delivered to the grantee as an escrow. If it be delivered to him, it becomes an operative deed, freed from any condition not expressed in the deed itself, and it will vest the title in him, though this may be contrary to the intention of the parties. One of the grounds upon which the rule is based is that parol evidence is inadmissible to show that the deed was to take effect upon condition.” In 9 Enc. L. (2d Ed.) p. 163, the rule as applicable to deeds of conveyance is stated as follows: “The delivery, without mistake or fraud, of a duly executed deed, passes a title which can be divested only by a condition in the deed itself.” See cases in note 2, Id. This rule has the support of an overwhelming weight of authority, and in this-state it is clearly voiced by section 3517, Rev. Codes 1899, which reads: “A grant cannot be delivered to the grantee conditionally. Delivery to him or his agent, as such, is necessarily absolute; and the instrument takes effect thereupon, discharged of any condition on which the delivery was made.” This common-law rule, as applied to deeds, was at the common law equally applicable to mortgages and other written instruments. The rule is stated in 20 Ene. L. 905, as follows: “A mortgage, like any other deed, must be delivered, and rules respecting delivery that are applicable to deeds generally must be applied to mortgages.” Nor is there any reason apparent to us why the same rule should not be applied to all agreements entered into without mistake or *8fraud, and which have been deliberately reduced to writing, and we find that such is the established rule of law. The rule is expressed in 11 Enc. L. (2d Ed.) 337, as follows: “It is a general rule that a deed or other instrument cannot be delivered to the grantee, obligee, or other party to have the benefit of the instrument, as an escrow, to take effect on a condition not appearing on its face. To allow a different rule would be to permit the legal effect of a written instrument, complete to all outside appearances, to be varied and in many instances defeated by oral proof.” In Lowber v. Connit, 36 Wis. 176, this rule was applied to a written agreement to convey 'land; and the court, referring to the cases which apply the rule as to conditional delivery of deeds of conveyance, said: “We see no reason why the same rule should not apply to the delivery of a written contract for the sale of real estate.” But in the’state of North Dakota all questions of the applicability of this rule to all written instruments is set at rest by section 3890, Rev. Codes 1899, which is as follows : “The provisions of the chapter on transfers in general concerning the delivery of grants, absolute and conditional, apply to all written contracts.” We have seen that section 3517, which governs “transfers,” declares that a transfer takes effect on- its delivery, “discharged of any condition on which the delivery was made”; and, under section 3890, this provision applied with equal- force to “all written contracts,” and hence it must be applied and must govern the alleged conditional delivery of the mortgage in question.
The agreements set out as a defense in the answer of John E. Cooley are squarely repugnant to the terms of the mortgage, and are of such a character as not only to vary and contradict its terms, but they go much further, and embody a contract wholly different from that stated in the written instrument. It is alleged that this contract was entered into at the time the mortgage was executed, and that the same was the inducement for its execution. If this extraneous agreement is valid and binding in the law, it will follow that the writing itself must give way to such agreement. But the rule is that contemporaneous agreements and negotiations are conclusively presumed to be merged in the writing. , Proof is allowed of such agreements in cases where fraud, mistake, or failure of consideration is alleged as a -ground of defense. But in the case at bar there is an attempt not only to defeat the mortgage for want of consideration, but to create a new and wholly different contract by an alleged agreement not embraced in the instrument. The recent case of First *9National Bank of Langdon v. Prior, 10 N. D. 146, 86 N. W. 362, is directly in point against the defendant’s position. In that case a mortgage upon real estate upon its face was given to secure a series of four notes, and two notes had been paid before the forclosure suit was commenced. In that case the defense attempted to show that under their answer the mortgage should be satisfied for the reason that, when the same was given, it was orally agreed that, when the two notes first falling due were paid, the mortgage should be released and surrendered to the defendants. In overruling this defense the following language was used: “As soon as the’ first two notes would ' be paid, the mortgage ceased as security for the last notes. The mortgage provided otherwise. The proposed oral agreement was inconsistent with the terms of the mortgage. It varied and contradicted its terms. It defeated its operation so far as two notes are concerned. It in no way was a collateral undertaking to the mortgage, but concerned the very essence of the’security, and embodied a new contract directly antagonistic to the provisions of the notes and mortgage. It proposed to limit the operation of the mortgage so that it would be security for two notes only, when, in terms, it is security for four. We cannot give effect to the proposed agreement, and hold that evidence concerning it was inadmissible for the reasons given. None of the numerous cases cited by appellants is 'based on a similar state of facts. They are adjudications holding that a different or additional consideration may be proven when the operaton of the written instrument would not be defeated, or they are cases holding that the modification of the written contract pertained to a collateral undertaking not inconsistent with the terms of the written instruments. Bank v. Lang, 2 N. D. 66, 49 N. W. 414, and cases there cited.”
Under the rule of law established by the adjudications and recognized by the provisions of the Code which we have cited, it follows that Ihe delivery of the mortgage in question was absolute, and when delivered the sáme took effect according to its terms, wholly discharged from tlie several conditions and agreements set out as a defense thereto in the answer to the complaint. The judgment of the trial court will therefore be reversed in so far as it adjudges that the mortgage herein is null and void, and in so far as it directs that the same be discharged of record and surrendered to the defendant Cooley; ¿nd the trial court will be further directed to ’ *10enter judgment in favor of the plaintiff as demanded in its complaint.
Young and Morgan, JJ., concur.