The lien claimant shall be entitled to recover upon the claim recorded the contract price after deducting all claims of other lien claimants to whom the claimant is liable, for furnishing labor, professional services, materials, or equipment; and in all cases where a claim of lien shall be recorded under this chapter for labor, professional services, materials, or equipment supplied to any lien claimant, he or she shall defend any action brought thereupon at his or her own expense. During the pendency of the action, the owner may withhold from the prime contractor the amount of money for which a claim is recorded by any subcontractor, supplier, or laborer. In case of judgment against the owner or the owner's property, upon the lien, the owner shall be entitled to deduct from sums due to the prime contractor the principal amount of the judgment from any amount due or to become due from the owner to the prime contractor plus such costs, including interest and attorneys' fees, as the court deems just and equitable, and the owner shall be entitled to recover back from the prime contractor the amount for which a lien or liens are established in excess of any sum that may remain due from the owner to the prime contractor.
RCW 60.04.151