
267 S.E.2d 164 (1980)
John Thorpe RICHARDS, Ancillary Admr., etc., et al.
v.
Robert M. MUSSELMAN, Executor, etc., et al.
Record No. 780954.
Supreme Court of Virginia.
June 6, 1980.
*165 Leigh B. Middleditch, Jr., Charlottesville (Roger S. Martin, McGuire, Woods & Battle, Charlottesville, on briefs), for appellants.
Paul M. Peatross, Jr., Charlottesville, James H. Michael, Jr. (Michael & Dent, Ltd., Carter & Peatross, Charlottesville, on brief), for appellees.
No brief or argument for Star-Leaf Corporation, Astir, Inc., Filplan, Incorporated and Jaymar Corporation, appellees.
Before I'ANSON, C. J., and CARRICO, HARRISON, COCHRAN, POFF, COMPTON and THOMPSON, JJ.
THOMPSON, Justice.
In this appeal we decide whether the complainants' right of contribution under a guaranty agreement is barred by the application of the equity maxim of "unclean hands."
By letter dated November 4, 1968, Henry W. Jackson and "his associate" contracted to purchase all the stock of Astir, Incorporated (Astir), a car wash operation, from a group of Richmond businessmen. Until paid for in full, the stock was to be held in escrow by Robert M. Musselman, attorney-at-law. On March 22, 1969, Jackson entered into an agreement with E. H. Clay Goss whereby Goss would become the "associate" mentioned in the November 4, 1968 letter. Goss was to share equally with Jackson in the rights and obligations of the November 4, 1968 agreement "as though the said agreement had been executed jointly by the parties."
Goss subsequently recommended that Joseph D. Patch, Jr., his longtime friend, be allowed to invest in the business. On May 31, 1969, Jackson and his wife, Stacy, Goss and his wife, Gwendolyn, and Patch and his wife, Patricia, all entered into an agreement guaranteeing the repayment of certain loans made to the business by Residential Industrial Loan Company (RILCO), a Norfolk lender. At the time this guaranty agreement was signed, no Astir stock had been taken out of escrow.
By summer, 1970, the car wash operation was experiencing financial difficulty. In order to discuss the situation, Jackson, Goss, Musselman, Patch, Mrs. Patch, and the Patches' attorney, Richard S. T. Marsh, met in Marsh's Washington, D. C., office on June 9, 1970. At that meeting Goss and Jackson requested that Patch contribute funds to the car wash. In exchange for such contributions, Patch wanted the 50% stock interest in the business that Goss would have received under the March 22, 1969 agreement. In addition Patch requested that the Gosses retain their personal liability on the corporate obligations, which included the May 31, 1969 guaranty agreement. Goss stated at the meeting that he no longer wished to participate in the business and would not contribute any money to it. As of the date of the meeting, Goss had not made any payment on the purchase of the Astir stock under the November 4, 1968 agreement.
Marsh and the Patches left the meeting with the impression that Goss had agreed to the Patches' terms for contribution. As a result, the Patches loaned $12,500 directly to the car wash business and another $12,500 to the Jacksons for them to invest in the business. A letter summarizing the agreements reached at the June 9, 1970 meeting was sent by Marsh to Musselman on June 19, 1970, with a request that any contrary understandings be corrected. No corrections were made. There is no indication, however, that the letter was seen by Goss.
The Patches' understandings of June 9, 1970 were subsequently further reduced to a written agreement to be signed by Goss and Patch. In August or early September Musselman informed Marsh that Goss refused to sign the agreement. Goss insisted *166 that a condition of his signing was that he be released from all his "personal liability exposure" in the car wash operations. This was not agreeable to the Patches, and they maintained this was contrary to the understandings reached at the June 9, 1970 meeting. At some point, however, Jackson, Marsh, and Musselman concluded that Goss had abandoned the agreement of November 4, 1968, to purchase Astir stock and, ultimately, the car wash operation as well; therefore, they considered him to have no further interest in the business.
The financial difficulties of the car wash continued so Jackson, Patch, Musselman, and Marsh met to discuss the situation. Another written agreement, dated September 25, 1970, and signed by the Jacksons and Patch, emerged from this meeting. Essentially, the agreement called for a transfer of all Astir stock, now apparently out of escrow, to Filplan, Incorporated (Filplan). Filplan was a corporation owning a car wash lease in Petersburg. Its sole stockholder, up to that point, was Jackson. Under the agreement, Patch was made a fifty percent stockholder in Filplan, and the Jacksons warranted that there was no outstanding stock interest in either Astir or Filplan which would interfere with the Patches' newly created fifty percent interest in Filplan. The parties realized, however, that the Astir stock was virtually worthless at the time of the June 9, 1970 meeting, and at all times thereafter, including the time of transfer to Filplan.
The business continued to experience severe financial problems. The RILCO loans became in arrears, and RILCO made demands on the Patches for payment pursuant to the May 31, 1969 guaranty agreement. Patch made payments on his guaranty in the amount of $43,162.22, and Mrs. Patch made payments on her guaranty in the amount of $51,748.57. These payments satisfied all obligations to RILCO under the May 31, 1969 guaranty agreement. No payments were made by either of the Gosses.
Patch died February 10, 1973, Jackson died July, 1974, Mrs. Patch died December, 1974, and Goss died June 12, 1975. John Thorpe Richards qualified as Virginia ancillary administrator of the estates of Mr. and Mrs. Patch. Stacy D. Jackson qualified as Executrix of the estate of Henry W. Jackson, and Musselman qualified as Executor of the estate of Goss. On August 19, 1975, the Executors and administrator of the Patch estates filed a Bill of Complaint against the Jackson Executrix, Mrs. Jackson in her own right, Musselman as Executor of the Goss estate, Mrs. Goss in her own right, and the various corporations, alleging that RILCO had been paid by the Patches pursuant to the guaranty agreement and that they were entitled to contributions from the other guarantors. Pending this suit in lower court, settlement was made with Mrs. Jackson and the Jackson estate. The respondents, Musselman, Executor, and Mrs. Goss, filed an answer alleging that they were not indebted to the complainants because they had been "squeezed out" by an improper transfer of Goss's Astir stock to Filplan without consideration and without the consent of Goss, and that by virtue of the doctrine of "unclean hands" the complainants were barred from contribution.
After lengthy ore tenus hearings on September 30, 1976, October 7, 1976, and April 22, 1977, the court, in a final decree of April 7, 1978, apparently accepting the "unclean hands" defense, dismissed the claims asserted against Musselman, Executor of Goss, and the claims asserted against Mrs. Goss.
The doctrine of "unclean hands" is an ancient maxim of equity courts and is usually stated in general terms. See W. deFuniak, Handbook of Modern Equity § 24 (2d ed. 1956) [hereinafter cited as deFuniak].[1]See also 2 J. Pomeroy, A Treatise on *167 Equity Jurisprudence § 397-404 (5th ed. 1941) [hereinafter cited as Pomeroy]. This court has recognized and frequently applied the doctrine, subject to the limitation set forth in Harrell v. Allen, 183 Va. 722, 732, 33 S.E.2d 222, 226 (1945):
While the "clean hands" doctrine is a wholesome one, it is not absolute and has its limitations. 30 C.J.S. Equity § 98, pp. 487 ff. It will not be applied where an inequitable result would be reached. Comstock v. Thompson, 286 Pa. 457, 133 A. 638, 640. Its purpose is to secure justice and equity, not to aid one in acquiring property to which he has no right. Sliman v. Moore, 198 Ark. 734, 131 S.W.2d 1, 3. In Waller v. Eanes Adm'r, 156 Va. 389, 399, 157 S.E. 721, we held that it should not be applied where the result would be contrary to public policy. [Emphasis added.]
See also Whitlow v. Mountain Trust Bank, 215 Va. 149, 153, 207 S.E.2d 837, 841 (1974).
If the doctrine of "unclean hands" were applied here, it would create an inequitable result. The respondents claim that Goss was "squeezed out" of his rights in the Astir corporation because of the collaboration of Jackson and Patch in transferring all the Astir stock to Filplan. The basic agreement of November 4, 1968 provided that the escrow agent would retain all shares of Astir stock until the stock was paid for in full. If there was a default in the payment of the purchase price, the sellers had the option of reselling the stock. Goss's right to any of the Astir stock was by virtue of the written agreement of March 22, 1969, which existed only between Jackson and Goss. The evidence clearly showed that no stock was ever transferred to Goss and further that he never paid anything on the purchase price. He is thus attempting to trade his undetermined rights under the agreements of November 4, 1968, and March 22, 1969, for his liability on the guaranty agreement of May 31, 1969. A court of equity should reject such an attempt.
The doctrine of "unclean hands" has been argued to apply on behalf of Mrs. Goss as well, but her situation is quite different. She was not a party to the agreements of November 4, 1968 and March 22, 1969; she never had a right to any of the Astir stock and, therefore, its transfer could not be to her prejudice. The doctrine has no application as to the cause of action asserted against her.
The doctrine of "unclean hands" cannot be asserted by the respondents for additional reasons. In Bond v. Crawford, 193 Va. 437, 447, 69 S.E.2d 470, 477 (1952), this court said:
It is well settled that the clean hands maxim does not operate to bar a sinner forever from a court of equity. As Mr. Justice Brandeis put it in Loughran v. Loughran, 292 U.S. 216, 229, 54 S.Ct. 684, 689, 78 L.Ed. 1219, "Equity does not demand that its suitors shall have led blameless lives." The misconduct relied on must relate directly to the matter in litigation. It is not sufficient that the wrongdoing is remotely or indirectly connected with the subject of the suit. [Emphasis added.]
See Pomeroy, supra.[2]See also deFuniak, supra.[3]See generally Powell v. Mobile Cab and Baggage Co., 263 Ala. 476, 479-80, 83 So.2d 191, 194 (1955); United Artists Records, Inc. v. Eastern Tape Corp., 19 N.C.App. 207, 212-13, 198 S.E.2d 452, 456 (1973); 27 Am.Jur.2d Equity, § 142 (1966); 30 *168 C.J.S. Equity § 98 (1965); 33 Va.L.Rev. 207 (1947).
The Patches, or their respective estates, paid the obligations under the May 31, 1969 guaranty agreement and then brought this proceeding for their equitable right of contribution. This long-established procedure was expressly recognized in Cooper v. Greenberg, 191 Va. 495, 501, 61 S.E.2d 875, 879 (1950). The issue before the court below was the liability of the Gosses for contribution on the guaranty agreement. Stock ownership in Astir was collateral to that issue. Accordingly, we adopt the reasoning of the Supreme Court of Illinois in Pitzele v. Cohn, 217 Ill. 30, 38-39, 75 N.E. 392, 395 (1905), where the court said:
[T]he maxim that a party must come into a court of equity with clean hands "only applies to the particular transaction under consideration, for a court will not go outside of the case for the purpose of examining the conduct of the complainant in other matters or questioning his general character for fair dealing. The wrong must have been done to the defendant himself and must have been in regard to the matter in litigation". [Citation omitted.] We suppose it to be a well settled doctrine that if a plaintiff requires any aid from an illegal transaction to establish his demand, he cannot recover it, or, in other words, if he is unable to support it without relying upon an unlawful agreement between himself and the defendant he must fail. But if the parties have been engaged in business either malum in se or merely prohibited by law, yet if the cause of action be unconnected with the illegal act and is founded upon a distinct and collateral consideration it will not be affected by their former unlawful conduct.
Therefore, we reverse the final decree and remand the case for further proceedings not inconsistent with the views herein expressed.
Reversed and Remanded.
NOTES
[1]  "Pursuant to the equitable maxim that `He who comes into equity must come with clean hands,' the so-called `clean hands' doctrine, the complainant seeking equitable relief must not himself have been guilty of any inequitable or wrongful conduct with respect to the transaction or subject matter sued on. Equity will not give relief to one seeking to restrain or enjoin a tortious act where he has himself been guilty of fraud, illegality, tortious conduct or the like in respect of the same matter in litigation. Not only must the complainant come into equity with clean hands but he must keep them clean throughout the course of the litigation." deFuniak at 39.
[2]  "The dirt upon his hands must be his bad conduct in the transaction complained of. If he is not guilty of inequitable conduct toward the defendant in that transaction, his hands are as clean as the court can require." Pomeroy at 97.
[3]  "But the rule or doctrine applies only to the particular matter under consideration, for the court will not go outside of the case for the purpose of examining the conduct of the complainant in other matters or for the purpose of questioning his general character for fair dealing." deFuniak at 39. (Emphasis added.)
