
    GEORGE C. MILLER, d/b/a Central Plumbing and Heating, Plaintiff and Appellant, v. CHARLES W. MELANEY et al., Defendants and Respondents.
    No. 13411.
    Submitted Jan. 10, 1977.
    Decided March 2, 1977.
    560 P.2d 902.
    
      Bolinger & Wellcome, Bozeman, Page Wellcome, argued, Bozeman, for plaintiff and appellant.
    Thomas I. Sabo, Landoe, Gary & Planalp, J. Robert Planalp, argued, Bozeman, for defendants and respondents.
   MR. JUSTICE DALY

delivered the opinion of the Court.

This appeal involves a subcontractor’s attempt to foreclose a mechanic’s lien against homeowners and a general contractor. The district court, Gallatin County, declined to foreclose the mechanic’s lien and ruled in favor of all defendants. The subcontractor, George C. Miller, d/b/a/ Central Plumbing and Heating, appeals.

On June 3, 1974, the general contractor Del Hostetter entered into a contract with homeowners Charles W. Melaney and Mary Gladys Melaney to construct an addition to their home. The total contract price for the work was $22,600. The contract provided for compensation to the contractor in periodic payments, upon completion of specific segments of the work. The final payment was due upon completion of the addition and the contractor’s delivery of lien waivers to the homeowners.

Miller accepted a subcontract to install the heating system pursuant to the general contractor’s specifications which included the size and location of duct work and furnace. The contract price was $925.00.

Homeowners tendered all payments under the contract, when due, until the payment for $1,520 which was to be paid after the installation of the heating system. Homeowners refused to make this payment because of alleged insufficiency of the heating system. Following refusal of payment, the contractor withdrew from the job and the subcontractor was denied admission to the site. The subcontractor has never received payments for work performed on the addition.

Thereafter homeowners contacted an architect who redesigned the heating system by replacing a substantial portion of the existing duct work with a larger diameter duct and insulating the duct system. A supplemental furnace was installed in the garage to heat those portions of the house farthest from the furnace which was initially installed by the subcontractor. Homeowners paid $1,542.60 for these modifications to the heating system.

The subcontractor brought an action in the district court to foreclose his timely filed mechanic’s lien. The district court denied the subcontractor foreclosure on the mechanic’s lien and awarded homeowners a personal judgment against the subcontractor on their counterclaim for defective workmanship, holding the gross amount of damages incurred by homeowners exceeded the cost of the subcontractor’s work by $757.08. The district court awarded homeowners attorney fees and costs incurred in defending the lien foreclosure action. The district court further held the general contractor was entitled to judgment in his favor, thus denying the subcontractor any recovery from the contractor.

These issues are presented for this Court’s review:

1) Allowing homeowners to recover a personal judgment against the subcontractor, lien claimant, by means of a counterclaim.

2) The judgment in favor of the general contractor thus allowing general contractor to avoid liability to the subcontractor.

Issue 1. The subcontractor contends that a personal judgment can only be based upon the privity of a contractual relationship between the homeowner and the subcontractor. Since no contract was executed between homeowners and the subcontractor in the instant case, the subcontractor argues no privity of contract was established for purposes of rendering a personal judgment.

This Court fails to find merit in this contention. The correct law is stated at 53 Am.Jur.2d, Mechanics’ Liens, § 391:

“In an action by a contractor or other claimant to enforce a mechanic’s lien, the owner may avail himself of all matters allowable by way of cross bill, cross complaint, recoupment, setoff, or counterclaim which arise out of the contract between the owner and the contractor, and which are available against the contractor or other claimant. He may maintain a cross bill, cross complaint, or counterclaim to recover damages sustained by the failure to perform the work according to the contract, or to recover damages connected with the construction, such as for defects or delay, damages for fraud, or damages from a materialman’s inducing him to enter into a contract with a bankrupt contractor who did not complete his contract. * * * ”

See: Monarch Lumber Co. v. Wallace, 132 Mont. 163, 314 P.2d 884.

The subcontractor cites the Montana case, Frank J. Trunk & Son, Inc. v. DeHaan, 143 Mont. 442, 391 P.2d 353, and a California case, R. D. Reeder Lathing Co. v. Allen, 66 Cal.2d 373, 57 Cal.Rptr. 841, 425 P.2d 785, to support his position.

Trunk, like the instant case, concerned a subcontractor’s attempt to foreclose a mechanic’s lien against homeowners who benefited from the subcontractor’s work. The district court denied the subcontractor recovery under the mechanic’s lien because of invalid filing of the lien. The subcontractor contended the district court should have entered personal judgments against the homeowners and the contractor notwithstanding the invalidity of the lien. The district court found, and this Court affirmed, that a personal judgment against the homeowners could not arise since such a judgment could only be grounded upon privity of contract between the subcontractor and the homeowners. Absent the subcontractor’s privity of contract with the homeowners, the only basis upon which a judgment against the homeowners could be predicated, i.e., the lien, was lost by failure to perfect it.

The critical distinction between Trunk and the instance case is the availability of remedies. In Trunk the subcontractor was denied a personal judgment against the homeowners because his remedy was the mechanic’s lien which he failed to perfect. Had the subcontractor perfected his lien, he would have been allowed to recover even though no contract existed between the lien claimant and the homeowner. The subcontractor need only establish a contract, express or implied, between the homeowner and the prime contractor. The rationale behind this rule is that by virtue of the contract between the prime contractor and homeowner, an implied agency is created between the two, giving the contractor the authority to contract with subcontractors and materialmen for performance and supplying of materials. Glacier State Electric Supply Company v. Hoyt, 152 Mont. 415, 451 P.2d 90.

Similarly, the homeowner is vested'with certain remedies when he faces a lien foreclosure action brought by a subcontractor, as specifically set out heretofore in 53 Am.Jur.2d, Mechanics’ Liens, § 391, which includes the remedy of counterclaim here. The purpose of mechanic’s lien legislation is not to strip the homeowner of recourse for frivolous lien foreclosure actions, but to allow the lien claimant a remedy where no privity of contract exists between the lien claimant and the property owner.

In R. D. Reeder Lathing Co. v. Allen, 66 Cal.2d 373, 57 Cal. Rptr. 841, 844, 425 P.2d 785, 788, the California court stated:

“ ‘ “While the essential purpose of the mechanics’ lien statutes is to protect those who have performed labor or furnished material towards the improvement of the property of another, * * * inherent in this concept is a recognition also of the rights of the owner of the benefited property. It has been stated that the lien laws are for the protection of property owners as well as lien claimants. * * * ” ’ ”

Reeder, like Trunk, involved a subcontractor who sought to foreclose a mechanic’s lien to impress the improved property. The lower court granted the subcontractor’s motion for summary judgment and decreed that defendant was personally liable to the subcontractor for the value of the labor and materials supplied. The Supreme Court found the provision of the lower court judgment which held the defendant personally liable to the plaintiff was erroneous. As in Trunk, the Supreme Court of California, held that in the absence of a contract between a lien claimant and the property owner, the right to enforce a mechanic’s lien against real property does not give rise to personal liability of the owner.

The rule denying a lien claimant a personal judgment against a property owner in a lien foreclosure action, where privity of contract is absent, cannot be conversely applied to deny a property owner a personal judgment against a lien claimant for damages attributable to the lien claimant and arising out of the contract between the property owner and the prime contractor.

Issue 2. The contention the district court erred when it concluded the general contractor owed nothing to the subcontractor and was entitled to a judgment is correct.

The record of the proceedings in the district court discloses the subcontractor constructed the heating system in compliance with certain specifications provided by the general contractor, e. g., the size of the furnace, the location of the furnace and the location of air ducts. Inherent in the district court’s award of damages to the homeowners is a determination that the heating system, as originally designed, was inadequate. Liability in regard to damages for deficiency in design applied to the contractor, not the subcontractor.

The district court erred when it entered judgment for the general contractor and denied the subcontractor his right to indemnification. The district court must determine the contractor’s liability for damages based upon the effect of the contractor’s deficient design specifications which the subcontractor was compelled to use in performing under the contract.

The judgment of the district court is affirmed in part, reversed in part and remanded for modification not inconsistent with this opinion.

MR. CHIEF JUSTICE HATFIELD and JUSTICES HASWELL, JOHN C. HARRISON and SHEA, JJ., concur.  