Clean hands

Clean hands, sometimes called the clean hands doctrine, unclean hands doctrine, or dirty hands doctrine, is an equitable defense in which the defendant argues that the plaintiff is not entitled to obtain an equitable remedy because the plaintiff is acting unethically or has acted in bad faith with respect to the subject of the complaint—that is, with "unclean hands". The defendant has the burden of proof to show the plaintiff is not acting in good faith. The doctrine is often stated as "those seeking equity must do equity" or "equity must come with clean hands". This is a matter of protocol, characterised by A. P. Herbert in Uncommon Law by his fictional Judge Mildew saying (as Herbert says, "less elegantly"), "A dirty dog will not have justice by the court".

A defendant's unclean hands can also be claimed and proven by the plaintiff to claim other equitable remedies and to prevent that defendant from asserting equitable affirmative defenses. In other words, 'unclean hands' can be used offensively by the plaintiff as well as defensively by the defendant. Historically, the doctrine of unclean hands can be traced as far back as the Fourth Lateran Council.

"He who comes into equity must come with clean hands" is an equitable maxim in English law.

Maxim
The maxim prevents those who have acted improperly in some way relating to the matter at hand from seeking a remedy or relief. Essentially, anyone with 'unclean hands', someone who has in some way contributed to their own injury or loss, or has in some other way acted dishonourably relating to the matter will be prevented by a court from remedy or relief regardless of how the adversary has treated them. The maxim protects the integrity of a court.

US patent law
The clean hands doctrine is used in US patent law to deny equitable or legal relief to a patentee that has engaged in improper conduct, such as using the patent to extend monopoly power beyond the claims of the patent.