
131 Cal.App.2d 439 (1955)
JOHN COFORD CAIN, Respondent
v.
EMMETT R. BURNS, Appellant.
Civ. No. 16248. 
California Court of Appeals. First Dist., Div. One.  
Mar. 14, 1955.
 Byron J. Snow and Robert E. Hayes for Appellant.
 Jarvis, Miller & Decker and Martin L. Jarvis for Respondent.
 BRAY, J.
 Defendant appeals from a judgment against him in the sum of $11,029.13 and interest, on a contract for services as an investigator.
 Questions Presented
 1. Was the contract one for splitting attorney's fees? 2. Must the defense of illegality be pleaded? 3. Are the parties in pari delicto?
 Facts
 Defendant filed a general denial to plaintiff's complaint, but offered no evidence as to the facts here related. Defendant is an attorney at law. Plaintiff had experience as an insurance adjuster. The parties entered into an oral agreement under which plaintiff was to render service to defendant as a private *441 investigator. Plaintiff's compensation was to be of two types: in certain cases plaintiff was to be paid mileage and an hourly rate; in other cases plaintiff was to receive an amount "measured by and equal to one-third (1/3) of the net" attorney's fees received by defendant in such cases. Defendant was to designate the cases as to which each type of compensation would apply. In the latter type cases, plaintiff's compensation was contingent upon defendant's success in the particular case and his receiving a fee therefrom. However, plaintiff's compensation was to come out of defendant's "general fund, without regard to the particular money paid in those designated cases." Plaintiff rendered services for approximately one and a half years, during which time six of the cases investigated by him were designated by defendant as being of the contingency fee type. Plaintiff received payment in full for five of these and for all cases to which the hourly rate applied. In the sixth case defendant received a fee of $36,609.40. For his work in that case defendant paid plaintiff only $1,174. On the one-third basis he was entitled to $12,203.13, leaving a balance due him of $11,029.13, the amount for which he sued and the amount the trial court awarded him.
 1. Fee Splitting.
 Rule 3 of the State Bar Rules of Professional Conduct approved by the Supreme Court, 26 Cal.2d 34, provides: "A member of the State Bar shall not ... nor, except with a person licensed to practice law, shall he directly or indirectly share compensation arising out of or incidental to professional employment. ..." (Emphasis added.) [1] While plaintiff testified that his contingent fees were not "tied into the recovery," that the amount defendant received as attorney's fees in the particular case was only "a scale" to determine the amount plaintiff was to receive, and that plaintiff's money was not to come out of the fees themselves but out of defendant's "general fund," it is obvious that the arrangement actually was one by which the attorney was in fact splitting his fees. Plaintiff was working on a percentage basis without regard to the work done, the time consumed or the difficulties encountered.  [fn. *] The evidence shows that plaintiff worked solely for defendant and at least on one occasion suggested that the injured person employ defendant *442 and subtly "led" such person to him. It is clear that the devices of having plaintiff's fee paid out of defendant's "general fund" instead of directly from the attorney's fees upon which it was based, and of using the latter fees as a "scale" were merely subterfuges to attempt to get away from the inhibition in rule 3. (See Hildebrand v. State Bar, 36 Cal.2d 504 [225 P.2d 508], for discussion of fee-splitting.)
 2. Defense of Illegality.
 Plaintiff contends that as defendant merely filed a general denial of the allegations of the complaint and did not plead such defense he is barred from raising it. As stated in 2 Witkin's California Procedure, 1531, the problem of pleading illegality is confused by contradictory expressions in the opinions. [2] So far as applicable to the circumstances of this case, the authorities seem clear that although generally illegality of a contract is a defense which must be pleaded, that rule is qualified as follows: (1) where the illegality appears on the face of the contract, or (2) where the evidence which proves the contract discloses the contract's illegality. (See Gelb v. Benjamin, 78 Cal.App.2d 881 [178 P.2d 476], and cases cited in Witkin, supra, 1532-1533.) The facts bring our case within both of the qualifications of the rule above mentioned. Therefore, the failure to plead illegality would not prevent the defense from being considered.
 3. Pari Delicto.
 However, a different rule bars the defense from being available to defendant. [3] This rule is stated in 12 Cal.Jur.2d 302-303, 304: "Where parties to an illegal contract are in pari delicto, neither may recover from the other property or money transferred in the course of the illegal transaction. But a member of a class for whose protection a statute was enacted is ordinarily not considered in pari delicto with those who violate the statute. The statute being for his benefit and he not being in pari delicto, he is entitled to relief and may resort to the courts to recover. ... The rule, therefore, is that if refusal to enforce or rescind an illegal bargain would produce a harmful effect on parties for whose protection the law making the bargain illegal exists, enforcement or rescission, whichever is appropriate, is allowed."
 [4] The object of the contract here--investigation--is legal and proper. It is only the fee-splitting that is against public policy. Nevertheless the contract may be enforced if *443 the parties are not in pari delicto. [5] As said in Estate of Cohen, 66 Cal.App.2d 450, 458 [152 P.2d 485], the common law doctrines of champerty and maintenance were never adopted in this state. [6] Here the statute prohibiting fee- splitting prohibits only the attorney, not the layman. The punishment for doing so is directed at attorneys only. (See Rules of Procedure of the State Bar, rules 8-42, 26 Cal.2d 38-54.)
 As said in Irwin v. Curie, 171 N.Y. 409 [64 N.E. 161, 58 L.R.A. 830], where the court permitted recovery by a customs broker who had placed claims of a third party in the hands of the attorney under an agreement that the attorney would divide with him half of the amount of recovery (New York has a statute similar to California's rule 3), "... we note that the penalty inflicted is upon the attorney and counselor alone and not upon his accomplice or possibly intended victim." (P. 412.) The court stated further (pp. 413-414): " '... whenever the statute imposes a penalty upon one party and none upon the other, they are not to be regarded as par delictum.' ... The application of that test to this case establishes the plaintiff's right to recover, for this statute was leveled against attorneys and counselors, to the ranks of which this defendant belonged, and, therefore, it operated directly upon him, but did not in terms prohibit plaintiff from making such a contract; therefore, it must be held upon the authority of Tracy v. Talmage (supra) [14 N.Y. 162 (67 Am.Dec. 132)] and the many cases cited there, that this plaintiff is not in pari delicto with the defendant, and, hence, the courts may interfere in his behalf."
 In Anderson v. Nelson, 83 Cal.App. 1 [256 P. 294], a son obtained title to his father's property for fraudulent purposes. The court held that the father's administratrix, standing in the father's shoes, was not in pari delicto with the son who had induced the father to make the transfer for fraudulent purposes, and could maintain an action for the recovery of the property. See Donnelley v. Rees, 141 Cal. 56 [74 P. 433], where the court applied the same rule to a grantor of a deed to defraud creditors, holding that under the circumstances the grantor was not in pari delicto with the grantees.
 In Wilson v. Stearns, 123 Cal.App.2d 472 [267 P.2d 59], a real estate broker entered into an exclusive employment agreement which did not state a termination date. (Section 10176, subdivision (f) Business and Professions Code prohibited *444 a broker from entering into such an agreement. The broker performed his part of the agreement and sued for his commission. The defendant set up the illegality of the contract. In allowing recovery, the court applied the rule stated by this court in Norwood v. Judd, 93 Cal.App.2d 276, 289 [209 P.2d 24]: "But the courts should not be so enamored with the Latin phrase 'in pari delicto' that they blindly extend the rule to every case where illegality appears somewhere in the transaction. The fundamental purpose of the rule must always be kept in mind, and the realties of the situation must be considered. Where, by applying the rule, the public cannot be protected because the transaction has been completed, where no serious moral turpitude is involved, where the defendant is the one guilty of the greatest moral fault, and where to apply the rule will be to permit the defendant to be unjustly enriched at the expense of the plaintiff, the rule should not be applied." (See also Denning v. Taber, 70 Cal.App.2d 253, 257-258 [160 P.2d 900], and Marshall v. LaBoi, 125 Cal.App.2d 253, 267-268 [270 P.2d 99].)
 [7] In the language of the trial judge here, "Rule 3 is not a two- edged sword, but a rule binding the lawyer who has accepted the fruits of his unlawful contract and now says he is forbidden to pay for them because he has violated the rules of professional conduct." To permit the attorney to retain the moneys he promised to pay plaintiff would put a premium on the attorney's disregard of the rules made for his guidance and conduct.
 [8] Therefore, although the illegality of the contract appears on its face, and the defense of illegality would therefore not have to be pleaded, as the parties are not in pari delicto defendant cannot successfully raise the defense of illegality.
 The judgment is affirmed.
 Peters, P. J., and Wood (Fred B.), J., concurred.
NOTES
[fn. *]  *. The contingency nature of the contract does not in itself make the contract illegal. See Bergen v. Frisbie, 125 Cal. 168 [57 P. 784].
