Hallam, J.
In December, 1913, defendant Virginia Buck, now Virginia Ireland, became the owner of a vacant lot.
1. During the winter of 1913-1914 an architect named Sayre furnished- to her, without charge, plans for a house to be built upon the lot. *158On May 18,1914, Virginia -Ireland and defendant C. F. Ireland executed and delivered to defendant Warden a note for $2,000 and a mortgage to secure it. This mortgage was recorded May 20, 1914. Thereafter the Irelands commenced the erection of a building on this lot in accordance with the Sayre plans. No money was advanced by the mortgagee under the mortgage at the time it was given nor until after the actual and visible beginning of the improvement on the ground. Between June 26 and November 11, 1914, the whole amount, save $4.01, was paid out by the mortgagee in payment of bills for the construction of the house. On the latter date this small balance was paid to one of the mortgagors.- The mortgagee knew at the time of taking the mortgage that the mortgagors proposed to erect a house on this lot and that the plans had been prepared therefor.
2. The court found that at or prior to the execution of the mortgage the mortgagors and mortgagee entered into an agreement, whereby the mortgagors agreed to build a house, and the mortgagee agreed to advance and pay the amount of the mortgage to pay bills for construction as presented, and that the subsequent payments were made pursuant to this agreement. The lien claimants contend that this finding is not- supported by the evidence. The evidence on this point is unsatisfactory. It is for the most part the testimony of the mortgagee himself. His testimony is evasive and contradictory. We cannot say, however, that the court might not find from it that at some time or other an agreement such as that found was in fact made, and from this testimnoy and the testimony of Mr. Ireland it might be inferred that the agreement was made when the mortgage was made, in May, 1914.
3. It is well settled in this state that a mortgage given to secure future advances, which advances are in fact later made, has priority over mechanics’ liens attaching after the mortgage is given, but before the advances are made, where the making of the advances was obligatory upon the mortgagee under the terms of this contract with the mortgagor. Hill v. Aldrich, 48 Minn. 13, 50 N. W. 1020; Bassett v. Menage, 52 Minn. 121, 53 N. W. 1064. There is probably no question as to this proposition, for these decisions are in accordance with the weight of authority. 21 Cyc. 239; 1 Jones, Mortgages, (7th ed.) § 370; Kiene v. Hodge, 90 Iowa, 212, 51 N. W. 717; Barnett v. Griffith, 27 N. J. Eq. *159201, 207; Lipman v. Jackson Architectural Iron Works, 128 N. Y. 58, 27 N. E. 975; Union Nat. Bank of Oshkosh v. Moline, Milburn & Stoddard Co. 7 N. D. 201, 73 N. W. 527; Blackmar v. Sharp, 23 R. I. 412, 50 Atl. 852. When the advances are optional or voluntary on the part of the mortgagee the rule may be different. Finlayson v. Crooks, 47 Minn. 74, 78, 49 N. W. 398, 645.
4. The question when the liens attach is the principal question of controversy in this case. The lien claimants contend that all liens attach as of the date when the architect began the preparation of his plans, which of course was before the mortgage was given.
Under, the statute in force prior to the revision of 1905 it was held that all liens attached as of the date of performance of the first work or the delivery of the first material on the ground, that is from the commencement of the improvement on the land, and that a' mortgage given and recorded prior to that time was prior to all liens; and this was the rule, though the architect performed his services prior to the giving of the mortgage. Wentworth v. Tubbs, 53 Minn. 388, 55 N. W. 543; City of Ortonville v. Geer, 93 Minn. 501, 101 N. W. 963, 106 Am. St. 445. The statute then provided that the lien statement filed should “operate to continue such lien during all the period of time from the time of the furnishing of the first item of such labor * * * material” (Laws 1889, p. 317, c. 200, § 8), and that “such liens shall attach at the time of the furnishing of the first item of such labor, skill, material or machinery and shall be preferred and be prior to any mortgage or other incumbrance of which the lienholder had no notice at the time of furnishing such first items and which mortgage or other incumbrance was unrecorded at the time such lien attached.” Chapter 101, p. 224, Laws 1895.
The revision of 1905 made some changes, and the provisions there are as follows:
“All such liens, as against the owner of the land, shall attach and take effect from the time the first item of material or labor is furnished upon the premises for the beginning of the improvement, and shall be preferred to any mortgage or other incumbrance not then of record, unless the lienholder had actual notice thereof.”
And the same section further provides that, as against a Iona fide pur*160chaser, mortgagee or incumbrancer without notice, however, no lien shall attach prior to the actual and visible beginning of the improvement on the ground.” E. L. 1905, § 3508 (G. S. 1913, § 7023).
These are the provisions now in force.
The claim of the lien claimants to priority under this statute is based wholly on the decision in Lamoreaux v. Andersch, 128 Minn. 261, 150 N. W. 908, L.r.A. 1915D, 204, where it was held that an architect might have a lien, as against the interest of the owner of the property who employed him, for the value or price of his services in preparing plans, though the owner abandoned the improvement before anything was done on the ground. The argument of the lien claimants proceeds as follows: For the purpose of determining when the liens attached the legislature has made two classes, first, owners, and second, Iona fide purchasers and incumbrancers without notice; that Warden, though an incumbrancer with a valid mortgage, is not an incumbrancer without notice. His rights are, therefore, the same as were those of the owner, his mortgagor. It is then contended that as a result of the decision in the Andersch case all liens must be held to attach as against the owner and mortgagees with notice claiming under him as of the time the architect commenced to prepare his plans.
It was not held in the Andersch case that, where a building is actually constructed, liens attach as against the owner of the land as of the time the architect commences the preparation of his plans. We cannot so hold here. The statute does not admit of such construction.
The language of the statute, when applied to a case where a building is actually constructed, is not doubtful. In plain terms it says that "all * * * liens * * * attach and take effect from the time the first item of material or labor is furnished upon the premises for the beginning of the improvement.” If anything more need be said, we might say that the provision that mechanics’ liens should be preferred to any mortgage or other incumbrance not of record at the time of furnishing such first item of material or labor unless the lienholder had actual notice thereof, leads to the inference that it was intended that such liens were not to be preferred to any mortgage which was then of record.
The rule contended for is not deducible from the decision in the Ander,seh case. It was hard in the Andersch case to harmonize the language *161of section 7023 with other provisions of the statute which seemed to warrant a lien, where the work stopped short of material or labor furnished upon the premises, but it was not the intent of that decision to throw doubt on the meaning of this language as applied to the usual case where improvement is made on the ground.
We hold that when a building is erected all liens attach at the time the first item of material or labor is furnished on the ground. The result is that the mortgage is prior to the liens.
5. During the pendency of this action the mortgagee foreclosed his mortgage by advertisement and sale. The court in its decision found that the amount due on the mortgage was the amount for which the premises were sold, with interest, and ordered the premises sold and this amount paid out of the proceeds. In other words, the decree, if entered pursuant to this decision, will amount to a second foreclosure. The lien claimants do not object to this, but they do object to the allowance of the costs of foreclosure by advertisement as part of the amount due on the mortgage. We see no impropriety in this. The mortgagee was under no restraint. He did not ask foreclosure in this action. He was not required to do so. He was at liberty to foreclose his mortgage by advertisement, and the costs of such foreclosure are a legitimate part of the amount due him thereon.
Judgment affirmed.