
203 Cal.App.3d 562 (1988)
250 Cal. Rptr. 33
LARRY J. BURTON, Plaintiff, Cross-defendant and Appellant,
v.
KEVIN SOSINSKY et al., Defendants, Cross-complainants and Respondents.
Docket No. F009234.
Court of Appeals of California, Fifth District.
August 3, 1988.
*564 COUNSEL
Champion & Walker and Darrell F. Champion for Plaintiff, Cross-defendant and Appellant.
James J. Kroll for Defendants, Cross-complainants and Respondents.
[Opinion certified for partial publication.[*]]
OPINION
MARTIN, Acting P.J.
Larry J. Burton (Burton), doing business as Yosemite Paving, filed a complaint against Kevin Sosinsky and Maureen Sosinsky, individuals and doing business as Fireside Dodge (Sosinsky), and Katotakis Constructors, Inc. (Katotakis), a California corporation, for foreclosure of a mechanics' lien on real property located in the City of Modesto, County of Stanislaus, California.[1] Plaintiff alleged that he, a licensed paving contractor, entered into an agreement with Manuel Katotakis, doing business as Katotakis Constructors, Inc., on August 5, 1985, for the paving and off-site improvements on a construction project. Katotakis was the general contractor on a work of improvement on real property located at 4620 McHenry Avenue in Modesto owned by Sosinsky. Burton agreed to pave the parking lot for Sosinsky's Dodge automobile retail dealership. Burton alleged he had complied with the applicable mechanics' lien law and was entitled to foreclose on the subject real property in order to satisfy his lien in the deficiency amount of $55,569.
Sosinsky filed an answer denying generally the allegations of the complaint and raising an affirmative defense of "unclean hands." Sosinsky also filed a cross-complaint alleging breach of contract against Katotakis, negligence as to Burton, and fraud, conspiracy to convert, and conspiracy to defraud against all defendants.
Burton filed an answer to the cross-complaint on May 29, 1986.
On June 30, 1986, Katotakis filed a notice of reorganization pursuant to chapter 13 of the federal Bankruptcy Act. Section 362 (a) of title 11 of the United States Code provided an automatic stay of proceedings against Katotakis.
A court trial was held before the Honorable Edward M. Lacy, Jr., on February 23 and 24, 1987. On May 22, 1987, Judge Lacy issued a notice of *565 tentative decision ruling that Burton's foreclosure on the mechanics' lien was barred by Sosinsky's defense of "unclean hands" in that Burton and Katotakis had conspired to defraud Sosinsky. Sosinsky was awarded damages in the sum of $2,190 plus costs.
A motion to set aside the court's decision was filed by Burton on June 11, 1987, heard on July 13, 1987, and denied on July 24, 1987. Judgment was entered in favor of Sosinsky on August 31, 1987, and Burton filed a timely notice of appeal.

FACTS
Burton entered into an agreement with Katotakis to build a pad and off-site improvement paving the adjacent parking lot at Sosinsky's Fireside Dodge dealership. The work was discontinued before completion due to nonpayment.
Burton testified he served Sosinsky with preliminary notice and subsequently recorded a mechanics' lien reflecting a balance due of $55,569.50. The balance of the mechanics' lien unpaid at the time of trial was $29,980.24.
On two separate occasions, Burton received checks made payable jointly to him and Katotakis which exceeded the amount of Burton's invoices. He deposited the money into his account and refunded the overpayment to Katotakis. Burton testified this was a normal practice within the industry; however, he was "uncomfortable" about returning any of the money to Katotakis since Katotakis owed Burton money on other jobs. He testified at his deposition the first time he was asked to rebate overages he commented "Well, this is kind of strange." A third overpayment was received from another job he was also doing with Katotakis. Burton voiced concerns about this practice to Mr. Katotakis and indicated his preference that the billing be accurate and, subsequently, Burton testified that he spoke to other people in the industry and became aware that this repaying of the overpayment was not a normal practice.
During this time, Burton and Katotakis were working together on five separate projects simultaneously.
Burton testified he first became aware that Katotakis altered invoices from Burton increasing the amount of the invoice and submitting the altered invoices to Sosinsky at the time Katotakis's deposition was taken pursuant to this lawsuit. However, he had heard rumors from other persons in the industry that Katotakis altered invoices. Burton was not sure exactly *566 when he heard these rumors but it was after he had indicated to Katotakis that he was uncomfortable with the procedure of rebating any overpayment to Katotakis.
On another occasion, Burton was handed a check from Katotakis made payable to Burton in the amount of $45,000 that Katotakis used to replace a joint check to M.J. Ruddy & Sons. Someone had written the word "Dodge" over the word "Toyota." The job number next to the name "Yosemite Asphalt and Paving" had also been altered. Burton was told by Katotakis to credit a Toyota project with this $45,000 check instead of the Fireside Dodge paving job. Burton contacted Mr. Sosinsky that evening and informed him of these events.
Laura Vannoy, Katotakis's bookkeeper, testified that pursuant to Katotakis's instructions she would increase the amount shown on the subcontractor's invoice, make a new invoice and submit it to Sosinsky. This practice resulted in an overpayment and a refund by Burton back to Katotakis. She described Burton as not being "in favor" of the procedure but was not reluctant to receive his share of the money. Therefore, Burton wrote a check for the relatively small amount of "overpayment" in order to get his money. She testified Katotakis informed Burton that there was a possibility that Katotakis would receive more than the amount actually invoiced. She testified Burton "wasn't totally in favor of it but because of the  because he did want to receive his money he would do that." No questions were asked by Burton and no explanation offered. She did not recall Burton expressing his personal dissatisfaction with the arrangement or demanding that the procedure stop.
Ms. Vannoy identified a check to Ruddy and Burton which Katotakis was going to give to Burton. Burton did not want a joint check so it was voided and another check was issued to Yosemite Asphalt. Someone had written the word "Dodge" over the word "Toyota" and changed the job number from the Fireside Dodge number to the Toyota job number. She recalled a discussion between Burton and Katotakis regarding the application of the second $45,000 check to the Toyota job explaining that the supplies that Burton had used for Fireside Dodge had not been paid and the supplies were also due for the Modesto Toyota job. Ruddy was requiring their payment before Burton could receive any more supplies. Therefore, the $45,000 was applied to the Toyota job so that Burton could in turn pay Ruddy for it and get his supplies and finish the Toyota job. This procedure was Katotakis's idea but it was discussed with Burton.
Sosinsky testified that Burton began work on the automobile dealership facility in June of 1985. He had contracted with Katotakis to build the *567 Fireside Dodge automobile facility and arranged with Katotakis to issue joint checks to Katotakis and whichever subcontractor performed the particular work. Sosinsky recalled that on December 16, 1985, Katotakis came to his office where Sosinsky wrote out numerous joint checks for all the subcontractors. At that time, Katotakis presented Sosinsky with a check made payable to Ruddy dated December 13, 1985, explaining that Ruddy had not been paid by Burton and Ruddy was demanding payment. Katotakis claimed he had paid Ruddy and showed Sosinsky a check for $45,000 asking Sosinsky to write out a check to Katotakis for $45,000 plus Katotakis's overhead expenses. Accordingly, Sosinsky paid Katotakis approximately $59,000.
Sosinsky telephoned Burton that evening explaining that Katotakis had presented a joint check for $45,000 and asked Burton if he had received that check. Burton replied in the negative stating that he had been out of town for a couple of days but that Katotakis's office had called and said they had some funds for him and he assumed Katotakis was referring to Sosinsky's joint check. Burton then told Sosinsky he would not accept a joint check and would require a check made out solely to Burton. Sosinsky told him to work it out with Katotakis and to call him if he had any problems. Sosinsky did not hear from Burton again until the end of December when Sosinsky telephoned Burton inquiring as to the further completion of the paving. At that time, Burton declined to perform further work for Sosinsky as Katotakis's check to Burton had not been honored by the bank and Katotakis had asked Burton to apply the amount of the check to the Toyota job. Sosinsky denied Burton had ever contacted him between the 16th and the 30th of December. Burton stated that Bank of America was "slow in paying" on the Toyota job and Ruddy was threatening to lien the project. Therefore, Katotakis said to apply the $45,000 to the Toyota dealer project. Sosinsky responded that he had paid the money more than two weeks ago and Burton's decision to hold the check for Katotakis or put it on the Toyota dealer's project was not Sosinsky's problem. Burton responded that he had to do what Katotakis asked him to do because his contract was with Katotakis, not with Sosinsky. Neither Katotakis nor Burton contacted Sosinsky after December 31, 1985. Sosinsky telephoned Katotakis who assured him it would be straightened out. After a few days, Sosinsky telephoned Burton who stated the situation had not been resolved. Sosinsky explained he had four checks totaling in excess of $59,000 and wanted a lien release in exchange. Burton then explained some of that money had been refunded to Katotakis. Upon Sosinsky's objection, Burton explained "I know it sounds illegal but it's a very common practice in the construction business."
Katotakis, Burton and Sosinsky met in mid-January of 1986 in an attempt to resolve their differences. Burton agreed to credit Sosinsky's *568 account for the $45,000 when Katotakis's check to him was "made good." Sosinsky demanded lien releases for the amount of $59,000 rather than the $57,000 Burton showed on Sosinsky's account. This Burton refused to do until Katotakis paid Burton the difference. Burton continued to refuse to finish the paving project. Sosinsky finally hired Galen Hedgecock Paving to complete the job.
Katotakis testified he had altered the invoices from Burton without Burton's knowledge. Katotakis explained to Burton that the line item in the contract with Sosinsky for paving was more than Katotakis's contract with Burton so, when Sosinsky provided joint checks in excess of Burton's invoice amount, Burton was to return the excess to Katotakis. Burton responded "something to the effect that there was not a problem with that." Katotakis did not recall Burton objecting or refusing to continue with this arrangement.
According to Katotakis, Burton bid on the paving subcontract work on every one of Katotakis's jobs during the five years since the two men became acquainted. During that five-year period of time, Burton did approximately 70 percent of all of Katotakis's subcontracting paving work. Several of these projects were bid on by Mr. Burton after the Fireside Dodge project.

DISCUSSION

Introduction
Article XIV, section 3, of the California Constitution affords recognition to mechanics' liens: "Mechanics, persons furnishing materials, artisans, and laborers of every class, shall have a lien upon the property upon which they have bestowed labor or furnished material for the value of such labor done and material furnished; and the Legislature shall provide, by law, for the speedy and efficient enforcement of such liens."
Pursuant to this constitutional mandate, the Legislature enacted the Mechanics' Lien Law, contained in the Civil Code commencing with section 3109. (1a) The purpose of the Mechanics' Lien Law is to prevent unjust enrichment of a property owner at the expense of a laborer or material supplier. (Industrial Asphalt Inc. v. Garrett Corp. (1986) 180 Cal. App.3d 1001, 1006 [226 Cal. Rptr. 17].) The case law has uniformly characterized the legislation as remedial in nature, to be liberally construed in favor of working persons; the objective has been to provide swift relief for this protected group. Such protection has been deemed necessary to counterbalance the economic advantage enjoyed by those who benefited from the *569 services rendered and the materials furnished, and to discourage a casual attitude toward payment of the obligations incurred. (Selby Constructors v. McCarthy (1979) 91 Cal. App.3d 517, 525 [154 Cal. Rptr. 164].) As our Supreme Court has stated: "[W]e conclude that the recordation of a mechanics' lien, or filing of a stop notice, inflicts upon the owner only a minimal deprivation of property; that the laborer and materialman have an interest in the specific property subject to the lien since their work and materials have enhanced the value of that property; and that state policy strongly supports the preservation of laws which give the laborer and materialman security for their claims. In measuring these values, we do not deal in cold abstractions: we take into account the social effect of the liens and the interests of the workers and materialmen that the liens are designed to protect. We measure these valued interests against the loss, if any, caused to the owner. (2) The balance tips in favor of the worker and the materialman; we conclude that the safeguards provided by California law to protect property owners against unjustified liens are sufficient to comply with due process requirements." (Connolly Development, Inc. v. Superior Court (1976) 17 Cal.3d 803, 827-828 [132 Cal. Rptr. 477, 553 P.2d 637], fn. omitted.)

I. WHETHER THE WRONGFUL CONDUCT OF KATOTAKIS MAY BE IMPUTED TO BURTON
The trial court determined Burton conspired with Katotakis to defraud Sosinsky. The court stated that although there was no evidence specifically showing that Burton directly benefited from the conversion of Sosinsky's money, it could reasonably be inferred that the long-range benefit Burton expected for his cooperation with Katotakis was a continued business relationship with Katotakis from which Burton would financially benefit. (3a) Burton argues that the wrongful conduct of Katotakis could not be imputed to him thereby causing him to forfeit his lien rights. Essentially, Burton asserts that the equitable defense of "unclean hands" cannot deprive contractors and subcontractors of their lien rights pursuant to the Mechanics' Lien Law.
Civil Code section 3262[2] provides in pertinent part: "Neither the owner nor original contractor by any term of their contract, or otherwise, shall waive, effect, or impair the claims and liens of other persons whether with or without notice except by their written consent, and any term of the contract to that effect shall be null and void...."
Burton relies on Bentz Plumbing & Heating v. Favaloro (1982) 128 Cal. App.3d 145 [180 Cal. Rptr. 223] in which it was determined that subsequent *570 to the 1972 amendment of section 3262, estoppel could no longer be invoked against a liening subcontractor or materialman. (Id. at p. 150.) Before the 1972 amendment of section 3262 it was settled that estoppel might be invoked against a liening subcontractor or materialman who, in order to induce payment from the owner, had given the contractor a waiver of lien, or a false receipt of payment, or a promise to look only to the contractor for his money. (Id. at p. 150; Ware Supply Co. v. Sacramento Savings & L. Assn. (1966) 246 Cal. App.2d 398, 407 [54 Cal. Rptr. 674]; R.D. Reeder Lathing Co. v. Allen (1967) 66 Cal.2d 373, 378-379 [57 Cal. Rptr. 841, 425 P.2d 785].)
"Nor will the doctrine of equitable estoppel, `which rests firmly upon a foundation of conscience and fair dealing' (City of Long Beach v. Mansell (1970) 3 Cal.3d 462, 488 ...; fn. omitted), allow an application of the doctrine which turns on its head the legislative judgment that principles of `fair dealing' require that subcontractors and materialmen be protected from overreaching by owners and prime contractors intent on depriving them of their lien rights." (Bentz Plumbing & Heating v. Favaloro, supra, 128 Cal. App.3d 145, 151, fn. omitted.) The court went on to note that estoppel may be invoked against a subcontractor which endorses a joint check, on the ground that its inclusion as payee makes it clear that the maker of the check intends thereby to discharge his obligation to the subcontractor. (Ibid.)
The question is whether Bentz stands for the proposition that equitable defenses, other than the doctrine of equitable estoppel, in this case "unclean hands," can also no longer defeat a lien right.
Sosinsky relies on Cal-West Nat. Bank v. Superior Court (1986) 185 Cal. App.3d 96 [229 Cal. Rptr. 431], which held that section 3264[3] did not bar an action in tort, namely conspiracy to commit fraud, against construction lenders by subcontractors and materialmen. The court concluded that section 3264 abolished all theories of equitable liens or trust funds in the construction loan field. (Id. at pp. 99-100.) However, the court noted that section 3264 has no application to claims of personal liability against construction lenders on account of their alleged intentionally wrongful diversion of construction loan funds. "When real parties seek damages for conspiracy to defraud, their claim in actuality is not `... with respect to any *571 fund for payment of construction costs' at all. Any resulting money judgment against petitioner would be satisfied from its general assets, not the construction loan fund." (Id. at p. 100.)
Cal-West does not answer the question presently before us since it dealt with a different code section, i.e., section 3264, rather than section 3262, and in that case it was the construction lenders who allegedly conspired to defraud the subcontractors and materialmen.
There is substantial evidence that Sosinsky was overbilled by Katotakis and some of Sosinsky's payments were credited to another account. Payment in excess of Burton's invoices was returned by Burton to Katotakis. There is also substantial evidence to support the trial court's conclusion that Burton agreed to this arrangement and profited by the continued business relationship with Katotakis. Moreover, the record supports the conclusion that Burton knew at the time his actions were wrongful and even illegal.[4]
Burton argues, that only statutory defenses are available and that general equitable principles do not apply. However, he fails to provide any persuasive authority in support of his argument.
(1b) The essential purpose of the mechanics' lien statutes is to protect those who have performed labor or furnished materials toward the improvement of the property of another from the overreaching of the owner of the benefited property and prime contractors intent on depriving them of their lien rights. (Bentz Plumbing & Heating v. Favaloro, supra, 128 Cal. App.3d 145, 151.) (3b) However, while section 3262 is designed to protect subcontractors and materialmen from improvident lien waivers, it does not follow that it was the Legislature's intent to grant them immunity from tort liability. As Sosinsky states, Burton virtually concedes that a mechanics' lien is equitable in nature and that general equitable principles apply to enforcement of a lien regarding the manner in which the lien is perfected but contends equitable principles may not be applied to deny enforcement of a lien. We find no indication that the Legislature intended such an arbitrary, one-sided application of section 3262 and reason suggests a contrary conclusion. Accordingly, we find the Mechanics' Lien Law does not preempt the entire field of equity nor bar a property owner from equitable defenses other than equitable estoppel where the subcontractor executed a lien waiver.


*572 II. WHETHER BURTON'S SILENCE REGARDING JOINT CHECK ALLOCATION CAN IMPAIR HIS MECHANICS' LIEN RIGHT BEYOND THE FACE AMOUNT OF THE JOINT CHECK
(4a) Burton contends his silence regarding the allocation of the joint checks cannot impair his mechanics' lien right beyond the face amount of the joint check. Inherent in Burton's argument is the misconception that it was his silence alone which the court determined was his wrongful conduct. The court below determined based on substantial evidence that Burton conspired to defraud Sosinsky. Burton's argument that (1) Sosinsky failed to prove actual fraud by Burton and actual prejudice to Sosinsky; (2) Burton's "mere silence" will not create an estoppel since he had no duty to speak; (3) estoppel is not permitted beyond the owner's reliance; and (4) Sosinsky was entitled to be credited with the full amount of the joint checks misses the point in that it fails to recognize the legal basis upon which the lower court decided. It was not Burton's mere silence but rather his actual participation in the conspiracy to commit fraud which invoked the unclean hands defense recognized by the lower court.
(5) Proceedings for the foreclosure of a mechanics' lien are proceedings in equity in which the court will apply equitable principles. (A.J. Raisch Paving Co. v. Mountain View Sav. & Loan Assn. (1972) 28 Cal. App.3d 832, 838 [105 Cal. Rptr. 96].) Such an action being one in equity, the court has jurisdiction to hear and determine all the issues in order to do complete justice by deciding the entire case. (Hendrickson v. Bertelson (1934) 1 Cal.2d 430, 434 [35 P.2d 318]; Blodgett v. Haddock (1949) 95 Cal. App.2d 17, 18 [212 P.2d 26].)
(4b) Burton quotes the following language: "Liens of mechanics or materialmen will not be held invalid unless they tend to defraud or fail to impart notice." (Consolidated Pipe Co. v. Wolski (1931) 211 Cal. 563, 564 [296 P. 277].)
This quotation from Chief Justice Waste's opinion in Consolidated Pipe v. Wolski stemmed from a repudiation of the prior practice that even though a mechanic or materialman filed a timely claim, if technical mistakes were subsequently discovered, the claim would be invalidated. By amending the applicable statute in 1907, when section 1203a (now Civ. Code, § 3261)[5] was added to the Code of Civil Procedure (Stats. 1907, ch. *573 474, § 1, p. 858), the Legislature mandated that if a timely claim were filed, so as to give notice to the property owner and other interested parties, an opportunity would be provided to correct any mistakes subsequently discovered. (Marsh, Cal. Mechanics' Lien Law Handbook (1965) pp. xi-xii.)
Thus, the reasoning is that the mechanics' lien should not be held invalid unless the recorded lien notice was fraudulent or misled innocent third persons or the owner of the property on which the labor or materials were used. (Wand Corp. v. San Gabriel Valley Lbr. Company (1965) 236 Cal. App.2d 855, 862 [46 Cal. Rptr. 486].) This position was taken to counteract the previous practice or tendency to strike a recorded lien notice due to technical mistakes in the notice. However, neither Chief Justice Waste's language nor the case law precludes an equitable defense of "unclean hands" supported by evidence of a conspiracy by a general contractor and a subcontractor (or materialman) to perpetrate a fraud on the property owner.
Burton concedes that where joint checks are issued and endorsed by the subcontractor it is deemed the subcontractor has been paid the full face amount of endorsed joint checks regardless of the amount actually retained by him. (See also Bentz Plumbing & Heating v. Favaloro, supra, 128 Cal. App.3d 145, 151.) However, he argues the trial court exceeded all bounds of reason when, after finding no forfeiture of the lien under section 3118 and no grounds for punitive damages, the court invalidated Burton's $29,980.74 mechanics' lien on "general equitable principles." Burton contends the only remedy remaining for Sosinsky was the offset for the full amount of the joint checks.
(6) The general principle behind the "clean hands" doctrine is that a court will neither aid in the commission of a fraud by enforcing a contract, nor relieve one of two parties to a fraud from its consequences, where both are in pari delicto. Any unconscientious conduct in the transaction may give rise to the defense. (DeGarmo v. Goldman (1942) 19 Cal.2d 755, 764-765 [123 P.2d 1]; Estate of Blanco (1978) 86 Cal. App.3d 826, 832-833 [150 Cal. Rptr. 645, 6 A.L.R.4th 850]; 7 Witkin, Summary of Cal. Law (8th ed. 1974) Equity, § 8, p. 5233.)
"This maxim is far more than a mere banality. It is a self-imposed ordinance that closes the doors of a court of equity to one tainted with inequitableness or bad faith relative to the matter in which he seeks relief, however improper may have been the behavior of the defendant. That doctrine is *574 rooted in the historical concept of court of equity as a vehicle for affirmatively enforcing the requirements of conscience and good faith. This presupposes a refusal on its part to be `the abetter of iniquity.'" (Precision Co. v. Automotive Co. (1945) 324 U.S. 806, 814 [89 L.Ed. 1381, 1386, 65 S.Ct. 993].) California has taken the position that this defense is available in a legal action. (Fibreboard Paper Products Corp. v. East Bay Union of Machinists (1964) 227 Cal. App.2d 675, 728 [39 Cal. Rptr. 64].) (4c) Although no case directly on point has been located, we see no reason why a successful defense of unclean hands should not bar the foreclosure of the mechanics' lien. Indeed, we note section 3261 provides that if a trial court finds that an error in "the statement of the demand, or of the amount of credits and offsets allowed, or of the balance asserted to be due the claimant or in the description of the property ..." is made with the intent to defraud, the lien may be invalidated. In so providing, the Legislature recognized that an intent to defraud, if proven, justified invalidation of the entire lien. It is a logical extension of this principle then to conclude the trial court may invalidate an entire lien, under the "clean hands" doctrine where the subcontractor and contractor, as here, conspired to defraud the property owner.

III., IV.[*]
.... .... .... .... .... .
The judgment is affirmed. Defendants are awarded their costs on appeal.
Hamlin, J., and Ballantyne, J., concurred.
NOTES
[*]   Pursuant to California Rules of Court, rule 976.1, this opinion is certified for publication with the exception of parts III and IV.
[1]  The first, third, fourth and fifth causes of action were alleged against Katotakis, which filed for protection under the federal bankruptcy statutes and are not a part of this appeal.
[2]  All statutory references are to the Civil Code unless otherwise specified.
[3]  Section 3264 provides: "The rights of all persons furnishing labor, services, equipment, or materials for any work of improvement, with respect to any fund for payment of construction costs, are governed exclusively by Chapters 3 (commencing with Section 3156) and 4 (commencing with Section 3179) of this title, and no person may assert any legal or equitable right with respect to such fund, other than a right created by direct written contract between such person and the person holding the fund, except pursuant to the provisions of such chapters."
[4]  This disposes of Burton's argument regarding whether sufficient evidence was presented to support the judgment. We conclude substantial evidence exists to support a finding that Burton's conduct was intentional.
[5]  Section 3261 currently provides: "No mistake or errors in the statement of the demand, or of the amount of credits and offsets allowed, or of the balance asserted to be due the claimant or in the description of the property against which the lien is recorded, shall invalidate the lien, unless the court finds that such mistake or error in the statement of the demand, credits and offsets, or of the balance due, was made with the intent to defraud, or that an innocent party, without notice, direct or constructive, has since the claim was recorded become the bona fide owner of the property, and that the notice of claim was so deficient that it did not put the party on further inquiry in any manner."
[*]   See footnote, ante, page 562.
