delivered the opinion of the court,
In this case, by a special verdict, the jury found that tire plaintiff was, in the year 1878, the year of the transaction involved in this controversy, and also for some years before and after that period, engaged in the business of buying and selling *501real estate for others upon commission. That in that year he had no license or commission as a real estate broker, and that it was during this time that he negotiated a sale of real estate to II. L. Taylor and company for the defendant for which he was to receive $10,000. On looking over the evidence we find that this verdict was founded upon the testimony of the plaintiff himself. In answer to the question, “What is your business ?” he answered, “I am buying and selling oil lauds for other parties, and real estate.” lie also said he had been engaged in that business about eight years. He further, in answer to a question put on part of the defence, admitted that he had not taken out license for the year 1878. There is therefore no doubt but that the plaintiff was engaged in the purchase and sale of real estate as a business, and so came within the definition of “ real estate broker,” as found in the case of Chadwick v. Collins, 2 Ca. 138. Such being the case, the plaintiff was, by virtue of the 18th section of the Act of the 10th of April 1849, brought within the provisions of the Act of May 27th 1841, and was subject to the penalty therein prescribed in case of a violation of those provisions. The result follows that Johnson, in the transaction in hand, stands in the position of a real estate broker who seeks to enforce a contract which, under the statute, he had no right to make, and by the making of which he subjected himself to the penalty imposed by that statute. But a contract such as this, opposed as it is alike to good morals and public policy, cannot be enforced. That has been ruled times without number. The case is almost identical with that of Holt v. Green, 23 P. F. S. 198. That, like this, was an action by a broker to recover his commissions, and there, as here, it appeared on cross-examination that he had no license The only difference between the two cases is, that in the one cited the demand was for commissions quantum meruit', and in the case in hand it is on a special contract. This, however, may be regarded as a distinction without a difference, for we suppose no one will contend that the statute may be avoided by the introduction of a special contract for commissions. The statute deals not with the question of compensation, for that is left to the agreement of the parties interested, but with the business itself. “ No individual or copartnership, other than those duly commissioned under the provisions of this Act, shall use or exercise the business or occupation of a stock broker, or an exchange broker, or a bill broker, under a penalty of $500 for each and every offence, to be recovered as debts are by law recoverable, one-half for the use of the Commonwealth, and the other half for the use of the guardians of the poor, in the city or county where such offence shall have been committed.”
If then the business itself bo unlawful, the commissions or *502gains arising from it without regard to the form of the contract for their payment are also unlawful.
But the plaintiff’s main contention is, that as the transaction took the shape of a special contract, and as under his narr. and proof, he might have recovered without a revelation of the illegal character of that contract, therefore, and notwithstanding its true nature was revealed by cross-examination, he was entitled to recover. It might be enough to answer that in this he is met in the teeth by the case above cited. It was not necessary to the plaintiff’s recovery in that case, that he should have proved that he had license, for that might have been presumed, but the fact that he had not license appeared on cross-examination, hence he lost his case. Nor does Shepler v. Scott, 4 Nor. 329, sustain the point made by the plaintiff, for there not only was the action on a special contract, but it nowhere appeared that the plaintiff was a broker, or that he had not been licensed. Again, the rule laid down in Swan v. Scott, 11 S. & R. 155, is cited as conclusive of this case. It was there said, as has been said in- many succeeding cases, that the test whether a demand connected with an illegal transaction, can be enforced at law, is whether the plaintiff requires the aid of the illegal transaction to establish his case. About this rule there is no special obscurity, and if there were any such obscurity, it may be rpadily made clear by an examination of the case itself. The plaintiff, Scott, obtained an award of arbitrators against Swan, founded on an illegal lottei'y transaction,- from which Swan appealed. He afterwards, withdrew the appeal, and, on the same day, executed to Scott his bond for the amount of the award, and thereupon Scott entered satisfaction of record. Then, in a suit brought upon the bond it was held, that the defendant could not go beyond that obligation to show that the foundation of the proceeding award was an illegal transaction. The argument of Mr. Justice Duncan on this point is unanswerable. “If,” says the learned justice, “Swanhad acquiesced in this award for twenty-days, the judgment would have been final; but the judgment remained notwithstanding the appeal, and when it was withdrawn Scott might have issued his execution ; the judgment became final, and I may add,.irreversible ; it fixed both parties; there was an end of the controversy.” The consideration of the bond was the award, which had, by the agreement of the parties, passed into a judgment, and that judgment could not be attacked collaterally, hence there was no way by which the original transaction could he reached. But how does all this fit the ease in hand ? Johnson has no intervening judgment behind which to shelter his illegal claim ; he has not so much as a bond or note ; he stands upon the illegal contract alone, and asks us to say that because in his narr. and case in chief he has *503had the ingenuity to avoid an exposition of its illegality, that illegality cannot he shown by way of defence. We have but to say, that if such is his reading of the rule of Swan v. Scott, he is badly mistaken in the legal principle thereby announced. Moreover, if his interpretation of the rule be correct, then has this court departed from it in many recent eases; as in the Morris Run Coal Co. v. The Barclay Coal Co., 18 P. F. S. 174; Kilborn v. Field, 28 Id. 194; Thorne v. The Insurance Co., 30 id. 15; Holt v. Green, supra, and Ham v. Smith, 6 Nor. 63. And if these cases were wanting of support they might readily be duplicated from the reports of the supreme federal court. From these, however, we select but two cases, and that because of the manner in which they elucidate the doctrine under discussion. Craig et al. v. The State of Missouri, 4 Pet. 410, was an action of assumpsit on a promissory note, and neither party having required a jury, the ease was submitted to the court, which, on hearing the evidence, found that the defendants did assume as the plaintiff had declared, and that the consideration for the note and the assumpsit was for loan office certificates loaned by the state of Missouri at her loan office in Chariton. Under this finding by the court below, it was held in the supreme court, that under the plea of non-assumpsit, the defendants were at liberty to question the validity of the consideration which was the foundation of the contract, and the constitutionality of the law in which it originated. Now, it will bo observed, from the statement of this caso, that the right of the defendant to attack the note through the illegality of the original contract on which it was based, was made to depend, not on what the plaintiff might happen to show, but upon the character of the pleadings. In other words, the defendant might raise the question of the validity of the contract as he might raise any other defence. In discussing this point. Chief Justice Mabshall says: “Neither'can it be doubted that the plea of non-assumpsit allowed the defendants to draw into question at the trial the validity of the consideration on which the note was given. Everything which disaffirms the contract, everything which shows it to be void, maybe given in evidence on the general issue in an action of assumpsit; the defendants therefore, were at liberty to question the validity of the consideration which was the foundation of the contract, and the,constitutionality of the law in which it originated.”
It will here be seen that tlie doctrine thus stated goes one step beyond what is required to sustain the ruling of the court below in the case in hand, for the defense was permitted to pass over the note and attack the contract in which it originated. Here, however, all that has been doné has been to show the unlawful character of the very transaction on which the-suit is *504founded. Again, we have in Armstrong v. Toler, 11 Wheat. 258, a statement by the same eminent authority of the rule of law governing illegal and immoral contracts, which is correctly abbreviated in the syllabus of that case as follows: “Where a contract grows immediately out of, and is connected with, an • illegal or immoral act, a court of justice will not lend its aid to enforce it. So if the contract be in part only connected with the illegal consideration, and growing immediately out of it, though it be in fact a new contract, it is equally tainted by it.” Where, however, the promise or undertaking on which suit is brought is not connected with the illegal contract, the rule is different. As in the case put by Lord Mansfield in Faikney v. Reynous, 4 Burr. 2009, if one person pay the debt of another at his request, an action may be sustained to recover the money, although the original contract was unlawful, and though the person who paid the money knew that it was paid in discharge of a debt not recoverable at law. All these cases tend to elucidate the rule as stated in Swan and Scott, and determine beyond controversy that whenever it is made to appear, during the trial of a case that the plaintiff’s claim .rests upon an illegal foundation, the court will not lend its aid to enforce it. On the other hand, where the illegal transaction is not involved iñ the case trying, but in a matter distinct and collateral a recovery may be had.
We are therefore brought to the conclusion that the court below committed no error in directing judgment to be entered on the special verdict for the defendant!
The judgment is affirmed.