The plaintiff has appealed from the trial court’s order allowing the defendants’1 motion for summary judgment. We affirm.
The plaintiff’s complaint alleged that on February 18, 1974, the plaintiff was employed as a pole and piling salesman for defendant North Pacific. On April 8, 1976, plaintiff terminated his employment with North Pacific. Thereafter, plaintiff became employed by National Forest Products, Inc., as a salesman. On June 10, 1976, the defendants, without excuse or justification, wilfully and maliciously interfered with the contractual relations between plaintiff and National Forest Products. As a proximate result of the interference, plaintiff suffered monetary damages.
The defendants’ answer contained three affirmative defenses and a general denial. A consolidated summary of the three affirmative defenses shows that the defendants alleged that on February 18, 1974, the plaintiff and North Pacific entered into an employment agreement.2 In April 1976, after the plaintiff was employed by National Forest Products, he commenced to solicit, buy and sell forest products in violation of the time, scope and area restrictions contained in the employment agreement with North Pacific. Any acts of the defendants with regard to the plaintiff were privileged and justified because all acts were taken to protect the contractual rights created by the employment agreement, and the financial and economic interests of North Pacific. The acts were further privileged and justified to protect defendant North Pacific from the plaintiff’s disclosing valuable business information obtained from a relationship of trust and confidence. The defendants prayed for a judgment dismissing the plaintiff’s complaint.
*574The plaintiff’s reply contained the following allegation as to each of the defendants’ three affirmative defenses:
"Referring to the employment agreement described in defendants’ first affirmative defense and attached as Exhibit A to defendants’ answer, defendants were and are barred from specifically enforcing such agreement or otherwise seeking any equitable relief in connection with plaintiffs employment by defendants because of defendants’ unclean hands.” (Emphasis added)
The defendants moved for a summary judgment on the grounds that there was no genuine issue as to any material fact and that they were entitled to judgment as a matter of law. ORS 18.105.3 In effect the parties narrowed the issue and the trial court held as a preliminary matter that there were no questions of material fact unless the plaintiff under his reply could invoke the doctrine of clean hands against the defendants.4 Neither the plaintiff’s pleadings nor affidavit in opposition to motion for summary judgment questions the time, scope and area restrictions of the employment agreement.5 The trial court then granted the defendants’ motion for a summary judgment holding *575that the proposed evidence referred to in the plaintiff’s counter-affidavit would be "totally irrelevant and immaterial” for the purpose of invoking the clean hands doctrine.6
We agree with the trial judge that the clean hands doctrine was not available to the plaintiff, but for a different reason. 2 Pomeroy’s Equity Jurisprudence § 397 at 90 (5th Ed 1941) gives the full title to the doctrine as "He who comes into equity must come with clean hands” and explains at pages 91-2:
"It says that whenever a party, who, as actor, seeks to set the judicial machinery in motion and obtain some remedy, has violated conscience, or good faith, or other equitable principle, in his prior conduct, then the doors of the court will be shut against him in limine; the court will refuse to interfere on his behalf, to acknowledge his right, or to award him any remedy.” (Emphasis in original.)
and at pages 93-4:
"This fundamental principle is expressed in the maxim, He who comes into a court of equity must come with clean hands; and although not the source of any distinctive doctrines, it furnishes a most important and even universal rule affecting the entire administration of equity jurisprudence as a system of remedies and remedial rights.”
See also Martin v. Tikka, 263 Or 350, 500 P2d 1209 (1972); Merimac Co. v. Portland Timber, 259 Or 573, 488 P2d 465 (1971); Robinson et ux v. Manning et al, 233 Or 392, 378 P2d 277 (1963); Taylor et ux v. Grant et al, 204 Or 10, 279 P2d 479, 279 P2d 1037, 281 P2d 704 (1955).
The plaintiff by his reply seeks to deny the defendants equitable relief because they do not have clean hands. The trouble is that the defendants are not requesting the intervention of a court of equity. The plaintiff chose the complaint alleges an *576action at law. The defendants’ answer pleads a legal defense. It alleges the defendants were privileged and justified in contacting National Forest Products to protect the interest of North Pacific. The defendants are not trying to specifically enforce the plaintiff’s employment contract. By way of contrast, in North Pacific Lumber Co. v. Oliver, 286 Or 639, 596 P2d 931 (1979), the plaintiff filed a suit in equity seeking to enjoin the defendants "from engaging in employment in violation of Oliver’s employment contract, using plaintiff’s confidential business information, and soliciting plaintiff’s customers and suppliers.” The Supreme Court of Oregon held that the clean hands doctrine did apply.
The plaintiff acknowledges that the complaint and the answer are on the law side of the court, but contends that the clean hands doctrine is an "equitable defense” and therefore can be pleaded as-a defense to a law action, citing ORS 16.460(2) and Fiberboard Paper Products Corp. v. East Bay Union of Machinists, 227 Cal App2d 675, 39 Cal Rptr 64 (1964). The plaintiff’s reliance on the Fiberboard Paper Products case, is misplaced. In that case the court said at p. 728, "We are satisfied that the equitable defense of unclean hands is available in this state as a defense to a legal action” because in California the distinction between law and equity has been abolished and the code pleading system allows equitable defenses to law actions. At all times material herein the distinction between law and equity had not been abolished in Oregon. ORS 11.020;7 Carey v. Hays, 243 Or 73, 409 P2d 899 (1966). ORS 16.460(2) does allow the pleading of an equitable defense to a law action, but it does not convert the doctrine of clean hands into an equitable defense.
Clean hands in the context of this case is not an equitable defense. Rather, it is a doctrine, maxim or principle of equity which may be invoked to deny the *577opposing party the right to come into a court of equity. 2 Pomeroy’s Equity Jurisprudence § 359 at 5 (5th Ed 1941). The doctrine of clean hands is applied for the protection of the integrity of the court and not for the benefit of the parties. North Pacific Lumber Co. v. Oliver, supra, 286 Or at 650; Prince v. Dierks, 244 Or 145, 416 P2d 318 (1966). The trial court or the appellate court may invoke the doctrine on its own motion. Merimac Co. v. Portland Timber, supra, 259 Or at 580. It is not necessary to plead "clean hands.” It may be raised under a general denial. Dickerson v. Murfield, 173 Or 662, 671, 147 P2d 194 (1944).
In this case the plaintiff by its reply could not invoke the doctrine of clean hands to prevent the defendants from pleading and claiming under a legal defense. Therefore, the trial court was correct in granting the defendants’ motion for summary judgment.
The dissent seems to be concerned that a miscarriage of justice will result from denial of the use of the clean hands doctrine in this law action, in light of the fact that the defendant successfully invoked the doctrine in the equity suit of North Pacific Lumber Co. v. Oliver, supra. In this connection, Dobbs, Remedies, § 2.4 at 45 (1973), states:
"Other equitable defenses, however, may operate to bar equitable remedies without affecting legal remedies. In other words, such defenses do not bar rights; they bar particular remedies, while leaving other remedies available. Thus the clean hands rules may bar the plaintiffs recovery of specific performance, but leave him a perfectly good claim for damages at law.” (Emphasis in original.)
Affirmed.
Defendant Douglas David is the president of defendant North Pacific.
A copy of the agreement was attached to the answer as an exhibit. It is similar in content to the agreement set out in the margin under footnote 1 in North Pacific Lumber Co. v. Oliver, 286 Or 639, 641, 596 P2d 931 (1979).
OES 18.105 repealed and replaced by Rule 47, Oregon Rules of Civil Procedure, effective January 1, 1980.
Clean hands was the only issue raised by the plaintiffs counter-affidavit to the defendants’ motion for a summary judgment. The counter-affidavit does not comply with ORS 18.105(4) wherein it is required that the opposing affidavits:
". .. shall be made on personal knowledge, shall set forth such facts as would be admissible in evidence, and shall show affirmatively that the affiant is competent to testify to the matters stated therein.”
The affidavit was executed by plaintiffs attorney who summarized the "clean hands” evidence in the related case of North Pacific Lumber Co. v. Oliver, supra, and attached a copy of the circuit judge’s opinion. The attorney averred "the evidence of unclean hands which will be offered in the Gratreak case will be very much the same, but in most cases even stronger than the evidence which was presented in the Oliver case.” In contrast to the situation in Oliver, the affidavit failed to connect that evidence of unclean hands to plaintiff.
Similar terms and conditions of the covenant not to compete were affirmed in the case of North Pacific Lbr. Co. v. Moore, 275 Or 359, 551 P2d 431 (1976).
The trial court’s opinion was rendered on November 16, 1978. The Supreme Court of Oregon’s opinion in North Pacific Lumber Co. v. Oliver, 286 Or 639, 596 P2d 931 (1979), is dated June 19, 1979.
ORS 11.020 repealed effective January 1, 1980. See, generally, Rule 2, Oregon Rules of Civil Procedure.