
271 A.2d 412 (1970)
WILLIAM J. DAVIS, INC., a corporation and Ralph D. Cohn, Appellants,
v.
Carrie SLADE, Individually and as next friend of Leslie Slade, a minor child, Appellee.
No. 5329.
District of Columbia Court of Appeals.
Argued September 21, 1970.
Decided December 3, 1970.
*413 Herman Miller, Washington, D. C., for appellants.
C. Christopher Brown, Washington, D. C., with whom Woodley B. Osborne, Washington, D. C., was on the brief, for appellee.
Before KELLY, FICKLING and GALLAGHER, Associate Judges.
FICKLING, Associate Judge:
Appellants appeal from a summary judgment awarding appellee, a former tenant, $690 which represented rent paid under a lease which had been declared void in a prior landlord and tenant action.
The undisputed facts are that appellants, knowing that substantial housing violations existed, rented certain premises to appellee. For 6 months appellee paid rent totaling $690 and then defaulted. The appellants then brought an action to recover possession of the premises for nonpayment of rent. Their cause failed, however, since the lease was admittedly void under our decision in Brown v. Southall Realty Co., D.C.App., 237 A.2d 834 (1968). Appellee brought this action to recover $690 rent paid under the void lease[1] and voluntarily moved from the premises during the pendency of her claim.
The basic question raised on this appeal is what, if any, compensation a landlord is entitled to receive from his tenant for the use and occupancy of the premises where the lease is void and illegal. The *414 appellants contend that they are entitled to keep the rent received under this illegal lease since not all contracts which violate a regulation are unenforceable. The appellee contends that the landlord should not be allowed to benefit from his illegal bargain and, therefore, is not entitled to any compensation. We hold that the landlord is entitled to some compensation as hereinafter stated.
The trial court granted appellee's motion for summary judgment based on our opinion in Miller v. Peoples Contractors, Ltd., D.C.App., 257 A.2d 476 (1969). That case involved a home improvement contract under which a homeowner had paid money in advance to an unlicensed contractor. Regulations issued for the protection of the public prohibited unlicensed contractors from accepting advance payments. We held that the contract was void and unenforceable. Since it would not be in the public interest to allow a wrongdoer to retain the fruits of his illegal agreement, the contractor was ordered to return the money he had received and was denied quasi-contractual recovery for work performed.
The appellants contend that Miller should be distinguished since, unlike here, it was concerned with a failure to obtain a license. It is also urged that Miller is restricted to cases where the party who has performed under a contract failed to first obtain a required license. Appellants refer to several cases where, despite the violation of regulations governing performance, the guilty but duly licensed party was allowed the benefit of his contract.
In Murphy v. Mallos, D.C.Mun.App., 59 A.2d 514 (1948), a licensed real-estate broker was allowed to recover his commission for producing a ready, willing, and able buyer despite the fact that he had violated a regulation while attempting to locate a buyer.[2]
In Cook v. James E. Griffith, Inc., D.C. App., 193 A.2d 427 (1963), the court was concerned with the alleged violation of a regulation demanding that any unlicensed person engaged in plumbing work be supervised by a licensed plumber. The court ruled that even if there were a technical violation of this regulation, the parties' contract was still valid and any services rendered must be paid for. In another case involving a plumber, Matthew A. Welch & Sons, Inc. v. Bird, D.C.App., 193 A.2d 736 (1963), payment for services was required despite a failure to obtain required work permits.[3]
It is true that in these cases payment was awarded to a licensee despite the violation of a regulation. It is also true that in cases which denied payment because of a violation of a statute or regulation designed for protection of the public the violation has always involved the lack of a necessary license.[4]
The rule emerging from these cases, however, is not that the contract of a licensed party will be enforced despite a regulatory violation. Rather, as we see it, the rule is that one who has violated a regulation cannot have his contract enforced if that contract has been declared void.[5] It is true that this court has been more prone *415 to find a contract void and illegal where a required license has not been obtained.[6] Yet, in Brown v. Southall Realty Co., supra, we held that the leasing of premises in violation of certain housing regulations is illegal and the contract unenforceable. The appellants' argument on this point, therefore, must assert that the Brown decision was incorrect rather than merely attempt to distinguish Miller on the licensing feature. In either case, we disagree.
It is also argued that, since the tenant is in pari delicto, the court should leave the parties to this illegal bargain where it finds them. We cannot resolve this case by simply stating that the lease is void and the landlord cannot enforce the collection of the rent since no one is now trying to enforce this lease. What we have, instead, is a tenant seeking the return of consideration paid under an illegal bargain. This request is made in the face of the general rule of law that
[a] party to an illegal bargain can neither recover damages for breach thereof nor, by rescinding the bargain, recover the performance that he has rendered. * * [RESTATEMENT OF CONTRACTS § 598 (1932).]
Though it is true that courts generally leave the parties to an illegal contract where they find them, there are exceptions. One such exception applies when one of the parties is not in pari delicto.[7] That party will then be allowed to rescind the contract and recover any performance he has rendered.
There is no mechanical rule to determine whether a party is in pari delicto; yet, a party will be held in pari delicto and denied restitution if, judging from prevailing mores, by participating in the illegal transaction he is guilty of moral turpitude.[8] The Housing Regulations State:
No owner, licensee, or tenant shall occupy or permit the occupancy of any habitation in violation of these regulations.[9]
This indicates that the tenant is also guilty of violating the regulations.[10] That fact alone, however, does not require that we hold the appellee in pari delicto.
Courts in the District of Columbia have taken judicial notice of the housing shortage.[11] The parties to this present action have stipulated to the existence of the shortage and have recognized that it is most acute for large families such as the appellee's. We must also consider the economic pressure on low income tenants[12] and the great disparity in bargaining position between landlords and such a tenant. In reality, a tenant is often unable to bargain at all and may be forced to accept a house that violates the regulations or sleep in the street.[13]
Even if we were to hold that the appellee was in pari delicto, we would still refuse *416 to apply the general rule denying restitution. Professor Williston has stated:
Occasionally, there may be cases where, in spite of both parties sharing in the illegality of an executed transaction, public policy will be best served by rescission, even though the result is to permit recovery by a guilty plaintiff. * * *[14]
In Rubin v. Douglas, D.C.Mun.App., 59 A. 2d 690 (1948), this court recognized and accepted this theory, stating
even though a party be considered technically in pari delicto he may be permitted to recover if the law in question was passed for his protection and it appears that the purposes of the law will be better effectuated by granting relief than by denying it.[15]
It is clearly appropriate to apply this rule to the present case.
The appellants further contend that the tenant may be equitably estopped to raise the illegality of the lease and, since fact finding is necessary to determine this issue, summary judgment was not appropriate. The appellants assert that if the tenant were aware of the violations, she was required to make her claim known immediately. Since she failed to do this, she is estopped from raising the issue of illegality. We do not think it proper to consider the question, however, since the appellants' answer below did not raise the estoppel defense as required by GS Civ. Rule 8(c). Neither were any affidavits submitted in opposition to the summary judgment motion asserting facts to show an estoppel.
We must still consider whether a landlord can set off any amount under a quasi-contractual theory. It appears that as a general rule such a theory is not available,[16] and this court has followed that rule on several occasions.[17]
In Diamond Housing Corp. v. Robinson, D.C.App., 257 A.2d 492 (1969), we held that a person occupying premises under a Brown lease is a tenant at sufferance. Since the lease is void ab initio, he becomes such a tenant from the time he first takes possession. In effect the law has ordered the landlord to award the tenant such a status. This tenancy, unlike the tenancy attempted by the lease, is legal.[18] For this reason we feel that the normal rule denying quasi-contractual recovery should not be followed. Although the landlord is entitled to nothing for what he gave the tenant under the lease, he is entitled to the reasonable value of the premises in its condition as it was when occupied.[19]
Reversed and remanded for proceedings not inconsistent with this opinion.
NOTES
[1]  When originally filed, this suit also included a claim for damages suffered by appellee's minor child as a result of a rat bite. That claim was settled by the parties themselves, however, and was not involved in the summary judgment proceedings nor is it before us on this appeal.
[2]  Apostolides v. Colecchia, D.C.App., 221 A.2d 437 (1966), reaches the same result. See Miller v. Avirom, 127 U.S.App.D.C. 367, 369, 384 F.2d 319, 321 (1967) (question recognized but not decided).
[3]  There was no contention that Welch, the plumber, was not licensed.
[4]  Hartman v. Lubar, 77 U.S.App.D.C. 95, 133 F.2d 44 (1942), cert. denied, 319 U.S. 767, 63 S.Ct. 1329, 87 L.Ed. 1716, rehearing denied, 320 U.S. 808, 64 S.Ct. 30, 88 L.Ed. 488 (1943); Miller v. Peoples Contractors, Ltd., supra; Kirschner v. Klavik, D.C.App., 186 A.2d 227 (1962); Holiday Homes, Inc. v. Briley, D.C.Mun. App., 122 A.2d 229 (1956); Rubin v. Douglas, D.C.Mun.App., 59 A.2d 690 (1948).
[5]  In Matthews A. Welch & Sons, Inc. v. Bird, supra, where the contract was enforced, the court specifically stated that the contract was not void.
[6]  The fact that certain conduct is illegal does not automatically lead to the conclusion that the contract is completely void. Courts do not lightly determine that an intended effect of a regulation or statute is the voiding of contracts in violation thereof. 6 Williston, Contracts § 1787 (1938). See 6A A. Corbin, Contracts § 1512 (1962); United States v. Missippi Valley Generating Co., 364 U.S. 520, 563, 81 S.Ct. 294, 5 L.Ed.2d 268 (1961).
[7]  Restatement of Contracts § 604 (1932).
[8]  6A A. Corbin, Contracts § 1536 (1962).
[9]  § 2301.
[10]  Robinson v. Diamond Housing Corp., D.C.App., 267 A.2d 833, 835 (1970).
[11]  Edwards v. Habib, 130 U.S.App.D.C. 126, 140, 397 F.2d 687, 701 (1968), cert. denied, 393 U.S. 1016, 89 S.Ct. 618, 21 L.Ed.2d 560 (1969).
[12]  Mrs. Slade and her six children were receiving public assistance benefits.
[13]  Mrs. Slade had sought housing through the National Capital Housing Authority. However, at that time they were unable to assist her.
[14]  6 Williston, Contracts § 1787 at 5081 (1938). This theory has also been accepted by the Restatement of Contracts at § 601.
[15]  59 A.2d at 691.
[16]  Restatement of Contracts § 598, comment c.
[17]  Miller v. Peoples Contractors, Ltd., supra; Kirschner v. Klavik, supra, note 3.
[18]  D.C.Code 1967, § 45-904. The tenant receives tangible legal benefits from this relationship. In the first place he cannot be declared a trespasser, which would give the landlord a right to immediate possession. Rather, he is now entitled to a 30-day notice to quit. The tenant is also protected from a cause of action for trespass.
[19]  Cf. Javins v. First Nat'l Realty Corp., D.C.Cir., 428 F.2d 1071 (1970); Cooks v. Fowler, U.S.App.D.C. (No. 24,546, decided November 13, 1970).
