3399533-995. Duty of contractor to defend action on claim of lien by person other than a contractor; rights of owner against contractor; other rights
A. When a lien is recorded or notice given by any person other than a contractor, the contractor shall defend any action brought thereon.
B. During pendency of such action the owner may withhold the amount sued for, and if judgment is given upon the lien, he may deduct from any amount due or to become due from him to the contractor the amount of the judgment and costs.
C. If the owner has settled with the contractor in full, or if such an amount is not owing to the contractor, the owner may recover back from the contractor the amount so paid by him, and for which the contractor was the party originally liable.
D. Any contractor, subcontractor or other person who is obligated by statute, contract or agreement to defend, remove, compromise or pay any claim of lien or action and who undertakes such activity has the rights of the owner and beneficial title holder against all persons concerning such activity, as specified in sections 33 420 and 33 994.
E. If any contractor or other person institutes an action to foreclose a lien pursuant to this article, the court may, at its discretion, award the prevailing party on the lien claim all reasonable expenses incurred in the action including attorney fees, other professional services and bond premiums under section 33 1004. 33995