
631 P.2d 688 (1981)
WILLIAMS BROS. CONSTRUCTION, Plaintiff and Respondent,
v.
George E. VAUGHN and kathryn M. Vaughn, Defendants and Appellants.
No. 80-395.
Supreme Court of Montana.
Submitted on Briefs May 8, 1981.
Decided July 9, 1981.
Leonard H. McKinney, Lewistown, for defendants and appellants.
Parrish, Knopp & O'Hare, Lewistown, for plaintiff and respondent.
*689 DALY, Justice.
In the spring of 1977 George Vaughn, defendant hereinafter, purchased a brick home located on Plum Creek in Fergus County, Montana. His plan was to move the house to northwest Lewistown and have it relocated on a foundation. In May of 1977 defendant entered into a written contract with Zion Building Contractor to move the house. On June 7, 1977, defendant entered into a written contract with Williams Brothers Construction, plaintiff hereinafter, whereby plaintiff would furnish all materials and perform all labor necessary to complete the foundation and basement for a total price of $7,000.
At the outset defendant wished to have the house placed on a completed foundation constructed of eight foot concrete walls. However, after numerous discussions between the parties it was determined that it would be to everyone's benefit if the foundation was constructed after the house was moved and placed over the excavation. The parties also decided that the foundation could not be totally constructed out of concrete and that the remainder would be done with masonry block. Since plaintiff did not do masonry work, it was its understanding that portion of the project would have to be subcontracted. The written contract was orally modified to adhere to the adjustments.
The house was moved to the site on August 5, 1977, and work on the foundation commenced shortly thereafter. Plaintiff worked on the foundation through October 4, 1977. Soon thereafter defendant made arrangements with a third party to have the foundation completed which included work contracted to be done by plaintiff. Plaintiff concluded that its obligation under the orally modified contract was terminated and did no additional work.
On January 3, 1978, plaintiff filed its lien against defendant's property in the amount of $4,852 for work done. On August 15, 1978, plaintiff filed its complaint for foreclosure of the lien. On October 6, 1978, defendant answered and counterclaimed, alleging that plaintiff failed to complete the basement, abandoned the contract, and asked for damages in the amount of $5,046.25. On April 24, 1979, plaintiff amended its complaint to include contract and quantum meruit counts.
On January 9, 1980, the matter was tried by a jury. By stipulation, the issue of attorney fees was reserved for determination pursuant to the verdict. At the conclusion of plaintiff's case and at the conclusion of all testimony, defendant made motions to dismiss which were denied. The jury rendered a verdict in favor of plaintiff on the lien in the amount of $4,582. Pursuant to a hearing, attorney fees and costs were awarded to plaintiff in the amount of $3,683.16. Defendant appeals from the verdict.
On appeal defendant contends the District Court erred in failing to dismiss the action on motions made by defendant. Defendant argues that plaintiff relied upon a written contract as a basis for asserting its mechanics' lien. The plaintiff failed to substantially comply with the contract and, therefore, is not entitled to claim benefits of the mechanics' lien.
Plaintiff, on the other hand contends that the written contract was orally modified; that the lien was filed pursuant to that final agreement; and further that a mechanics' lien may apply to that work completed under a contract which has been modified and recovery had on a quantum meruit basis.
In denying defendant's motions for a directed verdict, the District Court determined there was a question of fact which should be decided by the jury. It was the jury's function to determine if the action was based on the written contract, as defendant alleges, or the orally modified contract, as plaintiff contends. The jury found in favor of plaintiff; and, after reviewing the record, we agree.
Plaintiff filed and perfected its mechanics' lien in accordance with sections 71-3-501 et seq., MCA. The purpose and nature of mechanics' liens are enunciated in Smith v. Gunniss (1943), 115 Mont. 362, 144 P.2d 186, which states:

*690 "Under our statutes, the right of a mechanic or a materialman to a lien on property upon which he has supplied work, labor or materials is not dependent upon whether the contract with the owner of the property is written or oral or whether it is express or implied. [Citation omitted.] Our lien statutes are remedial. They are for the express purpose of providing for the payment of the claims of builders, mechanics and materialmen out of the property to which their work and material have contributed an increased value. For these reasons, this court has long been committed to the view that the lien statutes should be given full effect and that they should receive a liberal construction so that the objects and purposes of such statutes may be carried out. [Citation omitted.] `This lien [mechanics'] is a creature of the statute, and was not recognized at common law. It may be defined to be a claim created by law for the purpose of securing a priority of payment of the price and value of work performed and materials furnished in erecting or repairing a building or other structure, and as such it attaches to the land as well as the buildings erected thereon. 15 Amer. & Eng. Enc. Law, 5. Now, it is not the contract for erecting or repairing the building which creates the lien, but it is the use of the materials furnished and the work and labor expended by the contractor, whereby the building becomes a part of the freehold, that gives the materialman and laborer his lien under the statute. The lien is brought in operation by virtue of the statute, and the contract for building is entered into presumably in view of, or with reference to, the statute.' Van Stone v. Stillwell & Bierce Mfg. Co., 142 U.S. 128, 12 S.Ct. 181, 183, 35 L.Ed. 961, 964 ..." 144 P.2d at 189-190.
In defendant's counterclaim he alleges plaintiff breached the contract by failing to complete the work as contracted. The record indicates, however, that plaintiff completed a portion of the work as contracted. It was defendant's procurement of a third party to finish the foundation which prevented plaintiff from fulfilling its obligation under the contract. Gunniss further holds:
"`One who prevents or makes impossible the performance or happening of a condition precedent upon which his liability by the terms of a contract is made to depend cannot avail himself of its non-performance. In other words, he who prevents a thing from being done shall never be permitted to avail himself of the non-performance which he himself has occasioned.' 12 Am.Jur., sec. 329, p. 885.
"`The abandonment of an improvement before the completion thereof, by the owner of the premises, without fault on the part of the contractor, does not abrogate the right of the contractor, laborers, and material men to mechanics' liens for the value of the work done and the material furnished. In such case, the building or improvement is to be deemed completed, so far as the rights of persons to assert liens is concerned.' 36 Am.Jur., sec. 35, p. 38." 144 P.2d at 191.
The verdict and judgment of the District Court are affirmed.
HASWELL, C.J., and SHEEHY, WEBER and MORRISON, JJ., concur.
