The basic principle of the defence is that the pursuer should not be allowed to benefit from an illegal act. The problems with the defence are its rationale and its scope. There is a dearth of authority on the defence in the Scottish courts but far more is said about it in England (where the defence operates in largely the same way). The most recent case to deal with it is the judgement of the Supreme Court in Les Laboratoires Servier v Apotex Inc  UKSC 55 which was given on 29 October 2014.
The defence arose in the context of an intellectual property dispute. Servier were the holders of a number of patents for a drug (perindopril erbumine) which was used for treating hypertension and cardiac insufficiency. It held a UK patent protecting a crystalline form of the drug and a Canadian patent which protected the compound itself. Apotex, a company which specialises in the manufacture and marketing of pharmaceutical products, began to import and sell perindopril erbumine tablets in the UK at the end of July 2006. Servier initially obtained an injunction against the import but only on the basis of giving a cross-undertaking in damages. In other words, if the injunction later turned out to be wrongful, Servier would have to compensate Apotex.
The UK courts then found the UK patent to be invalid and Apotex became entitled to compensation. The compensation was calculated on the basis that Apotex would have sold 3.6m packs of the drugs in the UK had there been no injunction in place. The drugs would have been manufactured in Canada but sold in the UK. At around the same time, a litigation between the parties in Canada was concluded. The Canadian courts upheld the patent in that jurisdiction and found that Apotex were infringing it by manufacturing the drugs there. On this decision being issued, Servier attempted to avoid having to pay Apotex its compensation in the UK on the basis that it was contrary to public policy for Apotex to recover damages in the UK for being prevented from selling a product whose manufacture in Canada would have been illegal there as an infringement of the Canadian patent.
The main question for the court was this - does the infringement of a foreign patent constitute a relevant illegality for the purpose of the defence?
The Court of Appeal had answered that question in the negative applying the "public conscience" test that Kerr LJ had applied in Euro-Diam v Bathurst Ltd  1 QB1 in which he said that "in all the circumstances it would be an affront to the public conscience to grant the plaintiff the relief which he seeks because the court would thereby appear to assist or encourage the plaintiff in his illegal conduct or to encourage others in similar acts". In other words, the test was discretionary in nature (if not in law) and called for a subjective judgement about the behaviour of the plaintiff in any particular case.
But the Supreme Court did not think that the test outlined by the Court of Appeal was satisfactory. The judgement of the Court was given by Lord Sumption. The House of Lords had already criticised and rejected the public conscience test in Tinsley v Milligan  1 AC 240 on the grounds that it was unprincipled. A test which requires particular judges to weigh or balance the behaviour of plaintiffs is wrong because it leads to inconsistency. For example, in the present case, the Court of Appeal reached a different decision from the judge at first instance, not because they disapproved of his decision as a matter of principle but because they attached more weight to the importance of respecting the Canadian patents and were less impressed with Apotex's argument that it believed the Canadian patent to be invalid. So Lord Sumption explained that if the public conscience rule was adopted it would be virtually impossible for either party's advisers to give their clients a view on prospects in any case because the outcome would be completely unpredictable and dependent on which Judges heard the case.
Therefore, rather than a subjective approach, the court had to define "illegality" (or "turpitude" as it is properly called). It obviously covered criminal acts but Lord Sumption held that it went further than that and covered quasi-criminal acts as well. So, for example: dishonesty, corruption, acts contrary to public policy etc could all be relied on in an illegality defence. It is only these sort of acts, however, that engage the illegality defence because its fundamental basis is the public interest. If the public interest is not engaged, the illegality defence cannot operate. Accordingly, torts or delicts, breaches of contract, statutory or other civil wrongs which offend only against private interests will not give rise to the defence. As Lord Sumption put it, in these cases "The public interest is sufficiently served by the availability of a system of corrective justice to regulate their consequences as between the parties affected".
For these reasons, and in agreement with the Court of Appeal (at least insofar as its ultimate decision was concerned) the Supreme Court held that the defence could not be upheld in the present case. Lord Sumption ruled that while a patent is a public right in the sense that it is granted by the state it does not follow that the public interest is engaged by a breach of the patentee's rights. The grant of the patent only gives rise to private rights and these rights are protected adequately by the availability of civil law remedies such as damages. In this case, any loss which Servier makes as a result of having to pay Apotex in England will be off-set by its right to damages in Canada arising from the infringement of its patent by Apotex in that jurisdiction.
Lord Toulson was one of two justices who gave supporting opinions (the other being Lord Mance). Interestingly, however, Lord Toulson disagreed with Lord Sumption as to the reasons for dismissing the appeal. He held that the Court of Appeal had been right to take public policy considerations into account in reaching its decision because there was a public interest in the enforceability of cross-undertakings in damages. In the end, however, the result was the same.
The defence of illegality in contract or in delict is not one which will arise regularly in Scotland and its scope and application will likely remain a vexed issue for sometime.
If you need advice on this point as a means of defending a claim please do not hesitate to get in touch with me or one of the other members of the commercial litigation team on the details below.