delivered the opinion of the Court. The first ground of the defence is, that the action was prematurely commenced. The entry in the book given to the plaintiff by the cashier of the bank, is undoubtedly good evidence of a promise to pay the amount of the deposit on the 10th day of August ; and if this was a valid and legal promise, this action cannot be maintained. But it is very clear, that this promise or agreement that the deposit should remain in the bank for the t'me limited, is void by virtue of the Revised Stat. c. 36, § 57, which provides that no bank shall make or issue any note, bill, check, draft, acceptance, certificate or contract, in any fa -m whatever, for the payment of money, at any future day certain, or with interest, excepting for money that may be borrowed of the Commonwealth, with other exceptions not material in the present case.
The agreement that the deposit should remain until the 10th day of August amounts in law, by the obvious construction and meaning of it, to a promise to pay on that day. This *184therefore was an illegal contract and a direct contravention of the statute. Such a promise is void ; and no court will lend its aid to enforce it. This is a well settled principle of law. It was fully discussed and considered in the case of Wheeler v. Russell, 17 Mass. R. 281 ; and the late Chief Justice, in delivering the opinion of the Court, remarked, “ that no principle of law is better settled, than that no action will lie upon a contract made in violation of a statute, or of a principle of the common law.” The same principle is laid down in Springfield Bank v. Merrick, 14 Mass. R. 322, and in Russell v. De Grand, 15 Mass. R. 39. In Beldingv. Pitkin, 2 Caines’s R. 149, Thompson J. said “ it is a first principle, and not to be touched, that a contract, in order to be binding, must be lawful. ’’’ The same principle is fully established by the English authorities. In Shiffner v. Gordon, 12 East, 304, Lord FIlenhorough laid it down as a settled rule, “ that where a contract which is illegal, remains to be executed, the court will not assist either party, in an action to recover for the non-execution of it.”
It is therefore very clear, we think, that no action can be maintained on the defendants’ express promise, and that if the plaintiff be entitled to recover in any form of action, it must be founded on an implied promise.
The second objection, and that on which the defendants’ counsel principally rely, proceeds on the admission that the contract is illegal; and they insist that where money has been paid by one of two parties to the other, on an illegal contract, both being participes criminis, no action can be maintained to recover it back. The rule of law is so laid dowm by Lord Kenyon, in Howson v. Hancock, 8 T. R. 577, and in other cases. This rule may be correctly stated in respect to contracts involving any moral turpitude, but when the contract Js merely malum prohibitum, the rule must be taken with some qualifications and exceptions, without which it cannot be reconciled with many decided cases. The rule as stated by Comyns, in his treatise on contracts, will reconcile most of the cases which are apparently conflicting. “ When money has been paid upon an illegal contract, it is a general rule, that if the contract be executed, and both partiei arc in pan delicto. *185neither of them can recover from the other the money so paid; but if the contract continues executory, and the party paying the money be desirous of rescinding it, he may do so, and recover back his deposit by action of indebitatus assumpsit for money had and received. And this distinction is taken in the books, namely, where the action is in affirmance of an illegal contract, the object of which is to enforce the performance of an engagement prohibited by law, clearly such an action can in no case be maintained ; but where the action proceeds in disaffirmance of such a contract, and, instead of endeavouring to enforce it, presumes it to be void and seeks to prevent the defendant from retaining the benefit which he derived from an unlawful act, there it is consonant to the spirit and policy of the law, that the plaintiff should recover.” 2 Com. on Contr. 109.
The rule, with these qualifications and distinctions, is well supported by the cases collected in Comyns and by later decisions. The question then is, whether, in conformity with these principles, upon the facts agreed, this action can be maintained.
The first ground on which the plaintiff’s counsel rely, in answer to the defendants’ objection is, that there was no illegality in making the deposit, and that the illegality of the transaction is confined to the promise of the bank, and the security given for the repayment, that alone being prohibited by the statute.
The leading case on this point is that of Robinson v. Bland, 2 Burr. 1077. That was an action on a bill of exchange given for money lent and for money won at play. By the Si. 9 Anne, c. 14, it was enacted that all notes, bills, bonds, judgments, mortgages or other securities for money won or lent at play, should be utterly void. The court held, that the plaintiff was not entitled to recover on the bill of exchange, but that he might recover on the money counts for the money lent, although it was lent at the same time and place that the other money for which the bill was given, was won. The same principle was laid down in the cases of Utica Ins. Co. v. Scott, 19 Johns. R. 1 ; Utica Ins. Co. v. Caldwell, 3 Wendell, 296 ; and Utica Ins. Co. v. Bloodgood, 4 Wendell, 652. In these cases the decisions were, that although the notes were illegal and void *186as securities, yet that the money lent, for which the notes were given, might be recovered back. The principle of law established by these decisions is applicable to the present case. The only doubt arises from the meaning of the word “ contract,” in the prohibitory statute. But taking that word in connexion with the other words of prohibition, we think it equivalent to the promise of the bank ; and that the intention of the legislature was, to prohibit the making or issuing of any security in any form whati ;er, for the payment of money at any future day.
The next answer to the objection of the defendants is, that although the plaintiff may be considered as being particeps criminis with the defendants, they are not in pari delicto. It is not universally true, that a party, who pays money as the consideration of an illegal contract, cannot recover it back. Where the parties are not in pari delicto, the rule potior est conditio defendentis, is not applicable. In Lacaussade v. White, 7 T. R. 535, the court say, “ that it was more consonant to the principles of sound policy and justice, that wherever money has been paid upon an illegal consideration it may be recovered back again by the party who has thus improperly paid it, than, by denying the remedy, to give effect to the illegal contract.”
This principle however is not by law allowed to operate in favor of either party, where the illegality of the contract arises from any moral turpitude. In such cases the court will not undertake to ascertain the relative guilt of the parties, or afford relief to either.
But where money is paid on a contract which is merely prohibited by statute, and the receiver is the principal offender, he may be compelled to refund. This is not only consonant to the principles of sound policy and justice, but is now so settled by authority, whatever doubts may have been entertained ie specting it in former times.
In the case of Smith v. Bromley, 2 Dough 696, note, it was decided, that the plaintiff was entitled to recover in an action for money had and received, for money paid by the plaintiff to the defendant for the purpose of inducing him to sign the certificate of a bankrupt, the plaintiff’s sister. Lord Mansfield laid down the doctrine on this point, which has been *187repeatedly confirmed. “ If the act is in itself immoral, or a violation of the general laws of public policy, there the party paying shall not have this action; for where both parties are equally criminal against such general laws, the rule is potior est conditio defendentis. But there are other laws which are calculated for the protection of the subjects against oppression, extortion, deceit, &c. If such laws are violated, and the defendant takes advantage of the plaintiff’s condition or situation, there the plaintiff shall recover.” And this doctrine was afterwards adhered to and confirmed by the whole court, in the case of Jones v. Barkley, 2 Dougl. 684.
On this distinction it has ever since been held, that where usurious interest has been paid, the excess above the legal inter est may be recovered back by the borrower in an action for money had and received. So money paid to a lottery-office-keeper as a premium for an illegal insurance, is recoverable back, in an action for money had and received. Jaques v. Go lightly, 2 W. Bl. 1073. But in Browning v. Morris, Cowper, 790, it was decided, that where a lottery-office-keeper pays money in consequence of having insured the defendant’s tickets, such contract being prohibited by the St. 17 Geo. 3, c. 46, he cannot recover it back, though the premium of insurance paid by the insured to the lottery-office-keeper might be. The distinction, on which this case was decided, -is very material in the present case. Lord Mansfield referred to the determination in Jaques v. Golightly, where it was said, “ that the statute is made to protect the ignorant and deluded multitude, who, in hopes of gain and prizes, and not conversant in calculations, are drawn in by the office-keepers.” And he adds, “it is very material, that the statute itself, by the distinction it makes, has marked the criminal ; for the penalties are all on one side ; upon the office-keeper. The man who makes the contract is liable to no penalty. So in usury, there is no penalty upon the party who is imposed upon.” The same distinction is noticed and enforced by Lord Ellenborough, in Williams v. Hedley, 8 East, 378. In that case it was decided, that where money was paid to a plaintiff to compromise a qui tarn action for usury, it might be recovered back in an action for money had and received ; because the prohibition and *188penalties of the St. 18 Eliz. c. 5, attached only on “ the informer or plaintiff, or other person suing out process in the penal action, making composition, &c.” It was argued for the defendant in that case, “ that as the act of the defendant cooperated with that of the plaintiff in producing the mischief meant to be prevented and restrained by thé statute, it was so far illegal, on the part of the defendant himself, as to preclude him from any remedy by suit to recover back money paid by him in furtherance of that object; and that if he was not therefore to be considered as strictly in pari delicto with the plaintiff in the qui tam action, he was at any rate particeps criminis, and in that respect not entitled to recover from his co-delinquent, money which he had paid him in the course and prosecution of their mutual crime.” This argument was overruled, and Lord Ellenborough fully approved the doctrine laid down by Lord Mansfield in Smith v. Bromley, and the decisions in the several cases in which that doctrine had been confirmed. The same distinction has been recognized in other cases, and was adopted by this Court in Worcester v. Eaton, 11 Mass. F 376, in which Parker C. J., after referring to the above cases, said ; “ This distinction seems to have been ever afterwards observed in the English courts ; and being founded in sound principle, is worthy of adoption, as a principle of the common law in this country.”
The principle is, in every respect, applicable to the present case, and is decisive. The prohibition is particularly levelled against the bank, and not against any person dealing with the bank. In the words of Lord Mansfield, “ the statute itself, by the distinction it makes, has marked the criminal.” The plaintiff is subject to no penalty, but the defendants are liable for the violation of the statute to a forfeiture of their charter. To decide, that this action cannot be maintained, would be to secure to the defendants the fruits of an illegal transaction, and would operate as a temptation to all banks to violate the statute, by taking advantage of the unwary, and of those who may have no actual knowledge of the existence of the prohibition of the statute, and who may deal with a bank without any suspicion of the illegality of the transaction on the par' o the bank.
*189There is still another ground, on which the plaintiff’s counsel rely. This action proceeds in disaffirmance of an executory illegal contract, and was commenced before the money which the defendants contracted to pay, was by the terms of the contract payable ; the plaintiff therefore had a right to rescind the contract or rather to treat it as a void contract, and to recover back the consideration money.
It was so decided in Walker v. Chapman, Lofft, 342, /here money had been paid, in order to procure a place in the customs, but the place had not been procured ; and in an action brought by the party who paid the money, it was held, that he should recover, because the contract continued executory. This case was cited with approbation by Butter J. in Lowry v. Bourdieu, 2 Dougl. 470 ; and the distinction between contracts executed and executory, he said, was a sound one. The .same distinction has been recognized in actions brought to recover back money paid on illegal wagers, where both parties were in pari delicto. The case of Tappenden v. Randall, 2 Bos. & Pul. 467, was decided on that distinction. Heath I. said, “ it seems to me, that the distinction adopted by Mr. Justice Butter between contracts executory and executed, if taken with those modifications which he would necessarily have applied to it, is a sound distinction. Undoubtedly there may oe cases where the contract may be of a nature too grossly immoral for the court to enter into any discussion of it; as where one man has paid money by way of hire to another to murder a third person. But where nothing of the kind occurs, I think there ought to be locus pcenitentice, and that a party «hould not be compelled against his will to adhere to the contract.’’ The same distinction is recognized in several other cases. 5 T. R. 405 ; 1 H. Bl. 67 ; 7 T. R. 535 ; 3 Taunt. 277 ; 4 Taunt. 290.
In the case of Aubert v. Walsh, 3 Taunt. 277, the authorities were considered, and the law was definitively settled as above stated ; and it does not appear that it has ever since been doubted. In Utica Ins. Co. v. Kip, 8 Cowen, 20, the same principle is recognized, although the case was not expressly decided on that point. The distinction seems to be founded in wise policy, as it has a tendency in some measure *190to prevent the execution of unlawful contracts, and can in no case work injustice to either party.
It is however denied by the defendant’s counsel, that the contract in question was executory, within the true intent and meaning of these decisions, and the doctrine now laid down. This question has not been much discussed, and it is not necessary to decide it in the present case, the Court being clearly of opinion, that the plaintiff is entitled to recover on the other grounds mentioned. We have considered the question as to the distinction between executory and executed contracts, because it may be of some importance that the law in that respect should not be supposed to be doubtful in our opinion; which might be inferred, perhaps, if we should leave this question unnoticed.
The only remaining question is, whether the plaintiff was bound to make a demand on the bank before he commenced his action. The general rule is, that where money is due and payable, an action will lie without any previous demand. Bu/ where money is deposited in a bank in the usual course oi business, we should certainly hold, that a previous demand would be requisite. But if money should be obtained by a bank by fraud, or, as in the present case, by means of an ille • gal contract, the bank claiming to hold it under such contract, there can be no good reason given why the bank should be exempted from the operation of the general rule. In Clark v, Moody, 17 Mass. R. 145, it was held, that if a factor should render an untrue account, claiming a greater credit than he was entitled to, the principal would have a right of action without a demand.
If the defendants had sold to the plaintiff a post-note payable at a future day, it could hardly be doubted that an action would lie to recover back the consideration money, without any previous demand ; and there seems to be no substantial distinction between such a case and the one in question.
Judgment on default.