The action is to recover the purchase price of large quantities of milk alleged to have been sold and delivered to the defendants between March 15 and April 1, 1936. In addition to denials, the defendants’ amended answer sets forth as a first defense that the plaintiff at the time of the transactions in question was a milk dealer, as defined by the Agriculture and Markets Law, and was not licensed to buy or to sell milk within the State of New York. It is accordingly alleged that there can be no recovery of the *229purchase price of the milk sold by the plaintiff to the defendants-because these sales were in violation of law. The amended answer also asserts two counterclaims arising out of the alleged breach by the plaintiff of the contract referred to in the complaint.
The plaintiff’s reply, by failing to deny, admits all the allegations of fact of the affirmative defense. It contains additional allegations to the effect that the defendants, by asserting counterclaims arising out of the contract, have waived their right to attack its validity. The plaintiff moved to strike out the affirmative defense contained in the answer as insufficient and the defendants moved to dismiss the complaint, contending that the admissions contained in the pleadings precluded any recovery by the plaintiff. The plaintiff’s motion was granted; the defendants’ motion was denied.
The principal question presented concerns the right to recover upon contracts for the sale of milk by a dealer who has failed to comply with the license requirements of the Agriculture and Markets Law. The statute (§ 257) provides: “No milk dealer shall buy milk from producers or others or deal in, handle, sell or distribute milk unless such dealer be duly licensed as provided in this article. It shall be unlawful for a milk dealer to buy milk from or sell milk to a milk dealer who is unlicensed, or in any way deal in or handle milk which he has reason to believe has previously been dealt in or handled in violation of the provisions of this chapter.” Each licensee is required to pay a license fee (§ 258-a) and to file a bond conditioned for the prompt payment of all amounts due for milk purchased by him (§ 258-b). By section 41 the violation of any of the provisions of the statute is a misdemeanor.
A consideration of the entire statute, commonly known as the Milk Control Law (Agriculture and Markets Law, art. 21), makes it clear that it was intended to subject the business of dealing in milk to extensive statutory control (People v. Nebbia, 262 N. Y. 259; 291 U. S. 502), partly, at least, by means of a system of licenses to milk dealers, whose transactions would be carefully supervised and regulated. (People v. Perretta, 253 N. Y. 305.) By that statute the granting of licenses is strictly limited (§ 258-c), so that “ No license shall be granted to a person not now engaged in business as a milk dealer except for the continuation of a now existing business, and no license shall be granted to authorize the extension of an existing business by the operation of an additional plant or other new or additional facility, unless the Commissioner is satisfied that the applicant is qualified by character, experience, financial responsibility and equipment to properly conduct the proposed business, that the issuance of the license will not tend to a destructive competition in a market already adequately served, and *230that the issuance of the license is in the public interest.” Further to rectify the disorganized condition of the milk industry (§ 258-k), the Commissioner of Agriculture and Markets is authorized to fix the minimum prices to be paid by milk dealers to producers and the minimum or maximum prices to be charged for milk when sold by milk dealers to consumers (§ 258-m). To facilitate that purpose the Commissioner is authorized (§ 256) to inspect books and records relating to transactions in milk and to take testimony to ascertain the relevant facts. The Commissioner may decline to grant or renew a license or may suspend or revoke a license previously granted for any of the acts specified in section 258-c, many of which, it is important to observe, would not otherwise have precluded a dealer from engaging in the milk business. All these provisions, without reference to others, make it abundantly clear that the licensing of milk dealers was not intended merely as a method of producing revenue but that it is fundamental in the administration of the law.
It is unnecessary to elaborate the general principle that contracts in violation of express statutory prohibition are unenforcible. (Staples v. Gould, 9 N. Y. 520; Goodrich v. Houghton, 134 id. 115; Adler v. Zimmerman, 233 id. 431.) That principle, we think, is decisive of this case if, as we hold, the license to deal in milk is not in the nature of a tax but is required in the exercise of the police power of the State. The rule on this subject was early stated by Bronson, Ch. J., in Griffith v. Wells (3 Den. 226), as follows: “ When a license to carry on a particular trade is required for the sole purpose of raising revenue, and the statute only inflicts a penalty by way of securing payment of the license money, it may be that a sale without a license would be valid. (Johnson v. Hudson, 11 East, 180; Brown v. Duncan, 10 Barn. & Cress. 93; Chitty on Cont. 419, 697, ed. of 1842.) But if the statute looks beyond the question of revenue, and has in view the protection of the public health or morals, or the prevention of frauds by che seller, then,though there be nothing but a penalty, a contract which infringes the statute cannot be supported.” (See, also, 2 Benjamin Sales [4th Am. ed.], p. 825.) It is accordingly the settled rule that statutes which prohibit the sale of intoxicating liquor without a license preclude recovery of the purchase price of liquor sold by unlicensed persons. (Griffith v. Wells, supra; Smith v. Joyce, 12 Barb. 21; Turck v. Richmond, 13 id. 533.) The same principle has been applied to other trades and occupations, as, for instance, to master plumbers (Johnston v. Dahlgren, 166 N. Y. 354; Schnaier & Co. v. Grigsby, 132 App. Div. 854; affd., on opinion below, 199 N. Y. 577), to adjusters of insurance losses (Stake & Co., Inc., v. Roth, 91 *231Misc. 45; affd., 171 App. Div. 914), to public cartmen (Ferdon v. Cunningham, 20 How. Pr. 154), to detective agencies (Fox v. Smith, 123 App. Div. 369; revd., on other grounds, 197 N. Y. 527), and to physicians or dentists (Accetta v. Zupa, 54 App. Div. 33). Such, too, is the rule in England (Brightman & Co., Limited, v. Tate, L. R. [1919] 1 K. B. 463; Matter of Mahmoud and Ispahani, L. R. [1921] 2 id. 716; 7 Halsbury’s Laws of England [2d ed.], § 240). And see Williston Contracts (Vol. 3, § 1766), where many authorities in other jurisdictions are cited in support of the text. In this respect there is no substantial distinction between statutes which require the license to protect the public against imposition or unskillful service and where the license is required to protect the community from disaster caused by the unlimited competition of unlicensed dealers. In all such cases the statute is enacted under the police powers of the State and its aim is not revenue but the general welfare. It would be strange indeed if, under these conditions, the plaintiff could invoke the assistance of the court to enforce the very contract which the law forbids.
The plaintiff relies on the decision in Fosdick v. Investors Syndicate (266 N. Y. 130) as sustaining its contention that failure to comply with the statute does not prevent enforcement of the contract. Fosdick v. Investors Syndicate, however, presented a very different question, as brief analysis of the facts will show. In that case the defendant, a foreign investment company not licensed to transact business in this State as required by the Banking Law, had sold to the plaintiff installment certificates upon which the plaintiff had made payments on account. The action was by the purchaser to recover the payments made to the seller; not by the seller to enforce the contract by recovery of the purchase price. The decision was, therefore, confined to the question whether, within the principle of the authorities cited in the opinion (3 Williston Contracts, § 1789; Kneeland v. Emerton, 280 Mass. 371; 183 N. E. 155), the plaintiff was entitled to recover “ what he has paid.” It was held that the statutory restrictions invoked by the plaintiff “ gave neither the right nor the remedy asserted.” The seller’s right to enforce the prohibited contract was neither decided nor considered by the court. This distinction has frequently been declared. (Mahar v. Harrington Park Villa Sites, 204 N. Y. 231; Schley v. Andrews, 225 id. 110.)
It is suggested also that the defendants have waived the invalidity of the contract by asserting rights thereunder by way of counterclaim. The defendants had the right, however, to set up in their answer inconsistent defenses and counterclaims without prejudice to either. (Civ. Prac. Act, § 262; Societa Italiana v. Sulzer, 138 *232N. Y. 468; Carter, Macy Co., Inc., v. Matthews, 220 App. Div. 679.)
The orders should be reversed, the plaintiff’s motion to strike out the first affirmative defense should be denied, and the defendants’ motion to dismiss the complaint should be granted, with twenty dollars costs and disbursements to the appellants.
Martin, P. J., Townley and Glennon, JJ., concur; Dore, J., dissents and votes for affirmance.