The defence to this action on the merits must fail upon the ground that the contract set up by the defendants was one that cannot be enforced in a court of law. Every contract is void whose consideration is tainted with illegality. Such illegality is shown to exist when the consideration of the same contravenes the special provisions of a statute, or where it violates certain great principles of public policy. So agreements in contravention of the principles of the insolvent or bankrupt laws, have been held invalid. Cockshott v. Bennett, 2 T. R. 765; Pidcock v. Bishop, 3 Barn. & Cres. 605; Wiggin v. Bush, 12 Johns. 506 ; Case v. Gerrish, 15 Pick. 49; Rose v. Main, 1 Bing. N. C. 357 ; Staines v. Wainwright, 6 Id. 174; Payne v. Eden, 3 Caines, 213; Chit, on Cont. 670. This contract is objectionable as one prejudicial to the other creditors of the insolvent debtor, and operating to induce a course of action, on the part of the defendants’ creditors, different from what he might otherwise have done, and which might severely affect the interests of other creditors.
The plaintiff was a citizen of New Jersey, and being such, he ■w ould not be affected by the insolvent law of Massachusetts in reference to the discharge of the debtor, to the extent of discharging his debt. He was at liberty to come in and file his demands, and share the assets pro rata with the Massachusetts creditors. But filing the demand, affecting, as it might materially, the pro rata dividend, and what is more important affecting the amount of his debts and the number of his creditors, who might assent to his discharge, must be free, and without inducements by secret payments or preferences over other creditors made to him by the insolvent.
The terms of the contract that is now set up, were such as directly to induce the plaintiff to signify his assent to the discharge of the insolvent. His agreement was, that upon a certain payment of another demand being made to him by one Pitts Lewis, he would prove this demand as a claim against the estate, and would receive the dividend that should be thereon paid in satisfaction of the same, and would never prosecute the same.
*79It will be perceived that this was virtually binding said creditors to assent to the discharge, however fraudulent the insolvent might have been, or whatever else might induce other creditors to withhold their assent to his discharge, as this party had agreed to discharge his debt thus proved. Now if the creditors residing in another state elect to come in and prove their debts, and take their chance for better or worse with Massachusetts creditors, they certainly may do so, but they are not to be brought in by preferences or promises to pay all, or a part of the deficiency, that may result from the want of assets. Such arrangements and contracts are at variance with the spirit and policy of our insolvent law, providing for equal pro rata distribution of assets among the creditors, and authorizing a discharge of the insolvent only upon the assent of a majority of his creditors.
We think, therefore, that this contract cannot be set up in defence, being one that is in contravention of the policy of the insolvent laws of this commonwealth. Such being the case, for this cause, and, entirely irrespective of the objection, further argued, as to the want of consideration for the promise, this defence fails to the action, and the judgment was properly rendered in favor of the plaintiff upon these notes.
The further question is one of interest, and important, as settling a rule of practice. It is this; when in the specification of defence the defendant sets up a discharge, which, though as against a citizen of New Jersey may be unavailing as to the merits, yet may operate to prevent the issuing any process that will cause the arrest of the body of the debtor, how is the validity of such discharge to be tried, if contested by the plaintiff? Is it by the court alone, or by an issue to the jury ? And, upon consideration, we are all satisfied that such trial must be by the jury. The ease presents the same question as would arise when the discharge is pleaded in bar of a demand of a Massachusetts creditor. The defendant pleads his discharge. To that an answer or replication must be given, setting forth the facts that avoid the discharge, and to this a rejoinder must follow. An issue is then tendered, presenting a proper case for a jury, and from the very nature *80oí the case, the matter alleged in avoidance will be usually a question as to facts, and one properly to be passed upon by the jury. "We think in this respect there was error in the present case. The result will be that the exceptions of the defendant are overruled, and judgment is to be entered for the plaintiff, for the amount of his damages as claimed. A new trial will be ordered only as to the question of the validity of the discharge set forth in his specification. As to that, a proper issue will be framed and the questions arising thereon be submitted to the jury.