
368 A.2d 1156 (1977)
Walter L. FIELDS, Appellant,
v.
Al F. HUNTER, Sr., et al., Appellees.
No. 10452.
District of Columbia Court of Appeals.
Argued December 1, 1976.
Decided February 1, 1977.
Rehearing and Rehearing en Banc Denied March 7, 1977.
*1157 Clement Theodore Cooper, Washington, D.C., for appellant.
William C. Gardner, Washington, D.C., for appellee.
Before KERN, GALLAGHER and MACK, Associate Judges.
GALLAGHER, Associate Judge:
This is an appeal from a grant of summary judgment against the plaintiff-liquor store owner who sought (1) money owing for goods sold and delivered, and (2) punitive damages. The trial court found that the transaction at issue was a sale of liquor on credit in violation of D.C.Code 1973, § 25-133 and that therefore the defendant was entitled to judgment as a matter of law. We affirm.
There is no material dispute as to the facts. Sometime in early February of 1974 an agreement was made between plaintiff Fields and defendant Hunter for the sale of a substantial quantity of liquor. On the day that the liquor was to be picked up, Fields was told that Hunter did not have all the money in cash. Hunter offered to pay about $1400 in cash if Fields would accept a postdated check for the remaining *1158 $1000. This check was to be redeemed for cash in a few weeks when Hunter had received money from a third party. Fields agreed to this arrangement and there is no dispute that this constituted a credit transaction.
When, after the check was not redeemed for cash, Mr. Fields attempted to cash the check, he was informed that the account on which it had been drawn had been closed for several months. Thereafter, Mr. Fields filed the action which is now before us.
Appellant argues that the defense of illegality is an affirmative defense which must be pleaded in the answer and that because this was not done the defense was waived. There is nothing in the rules of procedure, however, which forbids amendment of the pleadings to add an affirmative defense and this was done by appellee.[1] The trial court is given latitude in making a decision on whether to allow amendment of pleadings and we find no abuse of discretion in the trial court's decision to allow amendment in this case. Super. Ct.Civ.R. 15.
We turn to the issue of whether the trial court improperly granted summary judgment. The legislation with which we are concerned, D.C.Code 1973, §§ 25-101 to -139, was enacted by Congress in 1934. It was intended to be a comprehensive act to regulate the sale of liquor in the District after the end of the prohibition era. Section 35 of that act, now D.C.Code 1973, § 25-133, prohibits the sale of liquor on credit and provides:
No holder of a retailer's license, except a retailer's license, class E, shall sell on credit any beverages except beer and light wines. For purposes of this section, the extension of credit by the holder of a class A retailer's license in connection with a sale by such license holder of any beverage through a credit card or other document or device intended or adapted for the purpose of establishing credit shall be considered a sale on credit. . .. This section shall not prohibit a club from extending credit to its members or the guests of members or a hotel from extending credit to its registered guests.[2]
It is clear from a reading of the statute that the agreement between Fields and Hunter was in violation of this statute.
"The general rule is that an illegal contract, made in violation of a statutory prohibition designed for police or regulatory purposes, is void and confers no right upon the wrongdoer." Hartman v. Lubar, 77 U.S.App.D.C. 95, 96, 133 F.2d 44, 45 (1942), cert. denied, 319 U.S. 767, 63 S.Ct. 1329, 87 L.Ed. 1716 (1943). See also Holiday Homes, Inc. v. Briley, D.C.Mun.App., 122 A.2d 229, 231 (1956). Courts have, for example, frequently refused to enforce contracts made in violation of licensing statutes, Kirschner v. Klavik, D.C.Mun. App., 186 A.2d 227 (1962); have allowed persons to recover money paid to persons violating such laws, Miller v. Peoples Contractors, Ltd., D.C.App., 257 A.2d 476 (1969) (home improvement contractor); and have refused to enforce loans advanced for wagering made in violation of gaming laws. Hamilton v. Blankenship, D.C.App., 190 A.2d 904 (1963).
Despite the principle enunciated, appellant argues that not all contracts in violation of a statute are unenforceable and that there are exceptions to the general rule.[3] While we agree with appellant that *1159 a court should not lightly declare that a contract made in violation of a statute is necessarily void and unenforceable, we find that this particular case does not fall under any of the recognized exceptions to the general rule.
Generally, when the parties to an illegal contract are in pari delicto courts will not lend support to either party and will refuse to enforce the contract. E.g., Contractor's Safety Ass'n v. California Compensation Ins. Co., 48 Cal.2d 71, 307 P.2d 626 (1957). In this case we conclude that the liquor store owner was in pari delicto with the defendant. As a liquor store owner he is charged with knowing the rules and regulations under which he is allowed to operate his business.[4]
Courts have permitted persons to recover on an illegal contract when "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." Rubin v. Douglas, D.C.Mun.App., 59 A.2d 690, 691 (1948). Although the legislative history is scant concerning the provision prohibiting credit sales,[5] it is apparent that the law was not enacted for the protection of liquor store owners. During the debate on the floor of the House, Representative Dirkson indicated that the purpose of the section was to guard against a man drinking on credit and then having his wife and family suffer by having to pay the bill out of the family budget.[6] At the time the legislation was enacted many persons were still seeking to revive prohibition[7] and the statute as enacted contains restrictions on liquor store owners. The provision with which we are concerned is a restriction on liquor store owners in order to protect the public interest.
In Mascari v. Raines, 220 Tenn. 234, 415 S.W.2d 874 (1967), the Supreme Court of Tennessee affirmed a dismissal of a suit brought on a note by the executrix of the estate of a beer dealer, finding that the purpose of the section prohibiting credit sales was "to regulate and prohibit certain trade practices" and that the "prohibition [was] distinct and absolute." 220 Tenn. at 240, 415 S.W.2d at 877. See also Bluthenthal v. Town of Headland, 132 Ala. 249, 31 So. 87 (1901).
The object of the statute is evident from the express prohibition against credit in liquor sales such as this. The intent of the legislature to protect the public (family) interest would be frustrated if we were to enforce this agreement. We hold that the Superior Court was correct in granting summary judgment to the defendant. The fact that appellee is not without fault does not outweigh the consideration that to enforce this illegal agreement would further the conduct Congress sought to prohibit. The public interest sought to be protected is of sufficient gravity to require the conclusion we reach.
Accordingly, the judgment appealed from is
Affirmed.
NOTES
[1]  After the appellee filed his motion for summary judgment, the court allowed appellee to orally amend his answer.
[2]  The provision regarding credit cards was added by Act of Dec. 8, 1970, Pub.L.No. 91-535, § 6, 84 Stat. 1394.
[3]  Professor Corbin has stated:

It is far from correct to say that an illegal bargain is necessarily "void," or that the law will grant no remedy and will always leave the parties to such a bargain where it finds them. . . . Before granting or refusing a remedy, the courts have always considered the degree of the offense, the extent of public harm that may be involved, and the moral quality of the conduct of the parties in the light of the prevailing mores and standards of the community. [6A Corbin on Contracts § 1534 (1962).]
[4]  D.C.Code 1973, § 25-132 provides that:

Whosoever violates any of the provisions of this chapter for which no specific penalty is provided, or any of the rules and regulations promulgated pursuant thereto, shall be punished by a fine of not more than $1,000 or by imprisonment for not longer than one year or by both such fine and imprisonment in the discretion of the court.
[5]  The House report on the bill, H.R.Rep.No. 274, 73d Cong., 2d Sess. (1934), merely states that the provision exists.
[6]  78 Cong.Rec. 270 (1934).
[7]  See id. at 263-94.
