
119 N.H. 833 (1979)
WESTINGHOUSE ELECTRIC SUPPLY CO., INC.
v.
ELECTROMECH, INC., & a.
No. 79-037. No. 79-038. No. 79-039. No. 79-040. No. 79-152.
Supreme Court of New Hampshire.
December 12, 1979.
*834 James M. Winston, of Manchester, by brief and orally, for the plaintiff.
Sulloway, Hollis & Soden, of Concord (Stephen M. Duprey orally), for the defendant, Trapper Brown Corporation.
*835 Stebbins & Bradley, of Hanover (Blair C. Wood orally), for the defendant, Trumbull-Nelson Construction Co., Inc.
DOUGLAS, J.
Westinghouse Electric Supply Company, Inc. (hereinafter Westinghouse) seeks recovery under a mechanic's lien pursuant to RSA ch. 447 for materials sold to Electromech, Inc. (hereinafter Electromech), an electrical subcontractor. The five resulting actions were consolidated for trial. The plaintiff's exceptions to the court's denial of its motion for a directed verdict, the court's failure to find and rule as requested, and its denial of the motion to set aside the verdict were reserved and transferred by the Trial Court (Mullavey, J.).
[1] The central issue is whether a materialman's lien is limited to the extent of funds owed the subcontractor with whom the materialman had contracted. We hold that if a supplier of materials has given notice only after the materials have been furnished, the resulting statutory lien is limited by RSA 447:6 to the amount due the subcontractor with whom the materialman had contracted.
Electromech was a subcontractor of Trapper Brown Corporation (hereinafter Trapper Brown), the general contractor on construction projects at the sites of defendants World Radio Mission, Thermal Dynamics, Yencing Realty and Sundman Realty (hereinafter owners). Electromech was also the subcontractor of Trumbull-Nelson Construction Co. (hereinafter Trumbull), the general contractor of the town of Hanover (hereinafter Town). During the course of performance at the various job sites, Electromech purchased materials from Westinghouse. Before completion of the project, Electromech initiated bankruptcy proceedings. As a result, Trapper Brown and Trumbull cancelled their contracts with Electromech and either completed Electromech's work or hired a new subcontractor.
At the time Westinghouse filed notice of its mechanic's lien with the project owners and Town, each retained funds due Trapper Brown and Trumbull. In some cases, these funds exceeded the amount owed Westinghouse by Electromech.
At trial, Trapper Brown and Trumbull submitted evidence of damages suffered as a result of Electromech's failure to complete the contracts. The court ruled that Westinghouse's lien was defeated to the extent that the general contractor had been damaged by Electromech's breach of its contract and, therefore, allowed Trapper Brown and Trumbull to set off the amount of damages they suffered against the amount held by the owners and Town before satisfying Westinghouse's liens. Consequently, the remainder of that sum *836 against which Westinghouse could foreclose its mechanic's lien was less than the amount Electromech owed Westinghouse.
[2, 3] A materialman is entitled to a lien to secure payment for supplies furnished by contract to a contractor or subcontractor of the owner for the purpose of erecting a building for the owner. RSA 447:5. The lien is limited, however, by the amount the owner owes the principal contractor. Boulia-Gorrell Lumber Co. v. East Coast Realty Co., 84 N.H. 174, 148 A. 28 (1929); Cudworth v. Bostwick, 69 N.H. 536, 45 A. 408 (1898). Westinghouse argues that once the owner's indebtedness to the principal contractor is established, the materialman's claim to the proceeds in the owner's hands becomes direct and completely independent of the rights of the contractor or other subcontractors. The uncontroverted facts of this case establish that at the time notice was provided by Westinghouse to the owners and Town, there was sufficient money owed by them to the general contractor to pay in full the cost of Westinghouse materials. Westinghouse claims, therefore, that the amounts held by the owner and Town must be directed toward payment of its claim.
[4] This analysis, however, ignores the express limitation contained in RSA 447:6 which provides that "said lien shall be valid to the extent of the amount then due or that may thereafter become due to the contractor, agent or sub-contractor. . . ." (Emphasis added.) In interpreting this language, it is significant that the words "contractor," "agent" and "sub-contractor" are preceded by the article "the," specifying a particular contractor, agent or subcontractor. The specified parties apparently refer to the parties of the preceding section, RSA 447:5, which provides a materialman with a lien "by virtue of a contract with an agent, contractor or sub-contractor of the owner. . . ." The party with whom the materialman contracts under RSA 447:5 is the same party that is referred to in RSA 447:6. When read together, then, the two sections provide a materialman with a lien if he has a contract with one of the designated parties, and the lien is enforceable up to the amount due that same party.
[5] This interpretation is in accord with our decision in Boulia-Gorrell Lumber v. East Coast Realty Co., 84 N.H. 174, 148 A. 28 (1929). There we found that a lien should not be enforceable against an owner who had no notice of the lienor's existence prior to the time the lien was asserted.
This limitation is demanded as a matter of simple justice and expediency. The owner, having direct relation with the *837 contractor, knows what his liability to him is. Having no such relation with the sub-contractor, he does not know what the contractor's liability to the sub-contractor is.
Id. at 177-78, 148 A. at 31. The purpose of limiting a subcontractor's lien, therefore, is to protect the owner from unknown liability to the subcontractor or materialman and from liability for payments in excess of the amounts owed to the general contractor. Without notice of the existence of a potential lienor, a person would obviously have no means of protecting himself against the possibility of having to pay more than once for the same work or materials.
Westinghouse correctly points out that the owners and Town are not in jeopardy for excess payment, for they retained amounts due the general contractor in a sufficient amount to pay the plaintiff. The interpretation placed by this court on the language of RSA 447:6, however, must apply not only to the present case but to all cases involving owners, contractors, subcontractors and materialmen.
[6] We hold that a correct interpretation of RSA 447:6 limits the lien of the materialman to amounts due or that may thereafter become due to the subcontractor with whom the materialman contracted. Accordingly, Westinghouse can only recover the amount the owner owes the subcontractor, Electromech.
[7, 8] Because this court has recognized a general right to set off, Varney v. General Enolam Co., 109 N.H. 514, 257 A.2d 11 (1969), the amount the contractor owes the subcontractor for partial performance may be set off by the amount the subcontractor owes the contractor for damages. The materialman, Westinghouse, which has a lien equal to the amount due the subcontractor, Electromech, should, therefore, only be permitted a lien against the actual monies the contractors owe Electromech; that is, the amount due after Electromech first accounts for any counterclaims, set-offs, or defenses. The trial court, therefore, correctly ruled that a contractor may set off its damages against a bankrupt subcontractor before a materialman of that subcontractor can enforce his lien.
In a separate issue involving Westinghouse's claim against the Town, the plaintiff argues that because the Town is a governmental unit, the Town is required by RSA 447:16 to demand a bond of the general contractor. Westinghouse contends that because the Town failed to demand the bond, the conditions of that bond as expressed in RSA 447:16 should be read into the terms of the contract between the Town and contractor, Trumbull.
*838 [9, 10] Although the purpose of the statute is to protect materialmen and subcontractors, the statutory obligation to provide a bond is placed upon those "who contract in behalf of the state or any political subdivision thereof. . . ." RSA 447:16. In this case, then, the obligation is on the Town. To read the terms of the bond into the contract would place a burden on the general contractor, Trumbull, to insure payment of all claims of all suppliers and materialmen for supplies and material furnished to the contractor or to any subcontractor on the project, and would thus, greatly expand the common-law contractual duties of the contractor, a result clearly not contemplated by the statute.
Westinghouse next argues that its claim should have priority over the general contractor Trumbull's lien on the amount held by the Town. Westinghouse principally relies on State v. Ingalls, 105 N.H. 244, 197 A.2d 214 (1964). There, the court found that funds retained by the State under a contract with a general contractor could be paid to the unpaid subcontractors and materialmen rather than to the trustee in bankruptcy of the general contractor. The court's reasoning in Ingalls, however, depended upon an express provision in the contract between the project owner and general contractor providing for both an amount retained by the owner and payment directly toward claims of suppliers. Based upon those facts, the court found that the owner and general contractor had intended to benefit the suppliers and materialmen through the amount retained. The suppliers and materialmen, therefore, became third-party beneficiaries to the contract between the State and the general contractor.
[11] In Tamposi Associates, Inc. v. Star Market Co., Inc., 119 N.H. 630, 406 A.2d 132 (1979), we held that in order for a third-party relationship to exist, the promisor and promisee must contract with an intent to confer rights upon the third party. The record here contains no allegations that the Town and Trumbull contracted with the intent of benefiting Westinghouse or any other materialman or subcontractor. In fact, the Town did not even know of Westinghouse's claim at the time of the contract. Westinghouse further argues that the comparative equities between the plaintiff Westinghouse and Trumbull compel the creation of an equitable lien in favor of the materialman. We disagree.
[12, 13] Westinghouse was provided with a simple method under RSA 447:5 of providing notice to the owner prior to supplying materials. It would, then, have a lien "on the same parity" as the general contractor. Boulia-Gorrell Lumber Co. v. East Coast Realty *839 Co., supra at 176, 148 A.2d at 30. As a result of Westinghouse's failure to provide notice prior to supplying materials, however, a burden of loss must inevitably fall on one of the parties. That burden should fall on the party having an opportunity to protect itself.
Exceptions overruled; appeal dismissed.
KING, J., did not sit; the others concurred.
